In Petrel, is it possible to COPY-PASTE items in input tree using ocean? I need to have a copy of a specific well or strategy somewhere; how can I do this?
For example if I want to have a copy of this well (myWell):
Tubing = e.Data.GetData(typeof(TubingString)) as TubingString;
Borehole myWell=Tubing.Borehole;
into my boreholecollection (Borhol):
WellRoot Welrot = Slb.Ocean.Petrel.DomainObject.Well.WellRoot.Get(PetrelProject.PrimaryProject);
BoreholeCollection Borhol = Welrot.BoreholeCollection;
Or have a copy of DevelopmentStrategy (oldStrategy):
EclipseFormatSimulator.Arguments args=WellKnownSimulators.ECLIPSE100.GetEclipseFormatSimulatorArguments(theCase);
DevelopmentStrategy oldStrategy=args.Strategies.DevelopmentStrategies.First();
into DevelopmentStrategyCollection (strategycol):
SimulationRoot simroot = SimulationRoot.Get(PetrelProject.PrimaryProject);
DevelopmentStrategyCollection strategycol=simroot.DevelopmentStrategyCollection;
Many domain objects that have copy/paste functionality in Petrel implement an interface called
ICopyable
. However, I don't believe this is consistent for all domain objects. A more reliable way of copy/pasting a domain object would be through the use of theICopyableFactory
service.ICopyable.Copy
takes a lot of parameters because this method is also used for the reference project tool (for copying domain objects between projects). If you are copying a domain object within the same project, all of your associated source/target properties will be the same (i.e.targetMgr = sourceMgr
).