0

Within a Petrel plugin, I wish to determine the location of the current project's .sim directory, if it has one. Is there an Ocean API call I can use to get this information?

David Arno
  • 42,717
  • 16
  • 86
  • 131

2 Answers2

1

You can get this directory from a simulation case object using the following method(s):

Case simCase = aSimulationCaseFromSomewhere;
string exportPath = EclipseFormatSimulator.GetArguments(simCase).CaseInfo.ExportPath;

Good luck!

Gaute

Gaute Gamst
  • 118
  • 6
  • That works, thanks. However, before I mark it as the correct answer, I have a supplementary question: there appear to be three well known simulators supported by the API: ECLIPSE100, ECLIPSE300 and FrontSim. I assume EclipseFormatSimulator.GetArguments(... will work fine for the first two, but what about the last one? – David Arno Jul 11 '12 at 20:53
  • This should work all fine with a FrontSim case as well (all well known simulators are Eclipse format - and behave similarly)! A case defined by a custom simulator - an implementation of EclipseFormatSimulator - might have an export behavior different from the "native" simulators though. The ExportPath will still be valid, but it's up to the plugged-in simulator to decide whether it exports Eclipse style decks and whether it uses the ExportPath directory for anything at all really... – Gaute Gamst Jul 12 '12 at 08:32
1

Yes this mechanism will work independent of whether your Simulation.Case is from one of the WellKnown simulators (E100, E300, FrontSim) or a Plug-in simulator based on the EclipseFormatSimulator class.

James.

Chippy
  • 81
  • 1