mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 09:00:20 -05:00
#14772 Python: Add WellLogPlot.export_data_as_las/ascii as object methods and forward exportWellLogPlotData to them
RimWellLogPlot_exportDataAsLas and RimWellLogPlot_exportDataAsAscii return the exported file names. RicfExportWellLogPlotData picks the method from the exportFormat and forwards to it. Add RicfForwarding::findWellLogPlot(). The Python wrappers keep their signature and List[str] return value, now calling the object methods. The misspelled export_tvdrkb argument is kept as a deprecated alias of export_tvd_rkb.
This commit is contained in:
1 parent
e3e09c0d1f
commit
6a2e7a2a21
7 files changed
+362
-82
No files matched your search
@@ -30,6 +30,7 @@
|
||||
#include "RimIdenticalGridCaseGroup.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
|
||||
#include "cafPdmObjectHandle.h"
|
||||
|
||||
@@ -140,6 +141,22 @@ std::expected<RimEclipseStatisticsCase*, QString> RicfForwarding::findStatistics
|
||||
return std::unexpected( QString( "Could not find statistics case with ID %1" ).arg( caseId ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::expected<RimWellLogPlot*, QString> RicfForwarding::findWellLogPlot( int viewId )
|
||||
{
|
||||
RimProject* project = RimProject::current();
|
||||
if ( !project ) return std::unexpected( "No project is available." );
|
||||
|
||||
for ( RimWellLogPlot* plot : project->descendantsIncludingThisOfType<RimWellLogPlot>() )
|
||||
{
|
||||
if ( plot && plot->id() == viewId ) return plot;
|
||||
}
|
||||
|
||||
return std::unexpected( QString( "Could not find well log plot with ID %1" ).arg( viewId ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user