#12719 Allow import of same well multiple times

Also exposes the well path collection object through the project object, and updates examples.
This commit is contained in:
Magne Sjaastad committed 2025-08-08 08:56:15 +02:00
1 parent 871973d02a
commit 377d300767
17 files changed
+204 -54

No files matched your search

@@ -36,6 +36,8 @@
#include "RimProject.h"
#include "RimSummaryCase.h"
#include "RimSurfaceCollection.h"
#include "RimTools.h"
#include "RimWellPathCollection.h"
#include "RiuMainWindow.h"
#include "RiuPlotMainWindow.h"
@@ -284,3 +286,36 @@ QString RimProject_createGridFromKeyValues::classKeywordReturnedType() const
{
return RimCornerPointCase::classKeywordStatic();
}
CAF_PDM_OBJECT_METHOD_SOURCE_INIT( RimProject, RimProject_wellPathCollection, "wellPathCollection" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimProject_wellPathCollection::RimProject_wellPathCollection( caf::PdmObjectHandle* self )
: PdmObjectMethod( self, PdmObjectMethod::NullPointerType::NULL_IS_INVALID, PdmObjectMethod::ResultType::PERSISTENT_TRUE )
{
CAF_PDM_InitObject( "Get Well Path Collection", "", "", "Get Well Path Collection" );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::expected<caf::PdmObjectHandle*, QString> RimProject_wellPathCollection::execute()
{
auto wellPathCollection = RimTools::wellPathCollection();
if ( !wellPathCollection )
{
return std::unexpected( "No well path collection found." );
}
return wellPathCollection;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimProject_wellPathCollection::classKeywordReturnedType() const
{
return RimWellPathCollection::classKeywordStatic();
}