Determine the location of a project's .sim directory via the Ocean API? - ocean

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?

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

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.

Related

How to get Webtop Drl of a document via .net application?

Is it possible to retrieve drl ex:https://host:port /ewebtop/drl/objectId/0900a58e80970f7b of document via .net application?.So that when users clicks on this link they can be able to edit the document and when they close the document the document should be autosaved onto documentum.
First of all: a link is a link. What you decide to do with it I u to you. Default handler in browser will just redirect you to webtop application. If you have SSO you can have the document opened for edit. There are some extra arguments that can be provided (view/edit).
The object id is the only varying part of the URL, so you can easily construct this in code.
Secondly: what is your goal? There is no way to make the document upload itself into Documentum repo. You can write a plugin for every application to handle that, but it seems like a big task - especially dealing with security.
The problem is that upon check-in, user must provide some information - at least about the new version number...
If you're building a thick client in .net I would go with DFS - that's the only real option here.

XPages POI4Xpages download to network location

Using POI4Xpages which is great LINK
However, I was wondering, at present, when it creates my word document, it simply downloads, like a normal download from the internet, storing it the downloads folder in windows (using Chrome anyways)
Is there a way, using POI4XPages, to instead, dump the file to a specified network location, for example a shared drive?
After that, I would simply build a link to the file using the network location, and a filename variable for example to pick the correct file.
If thats not possible, is it possible to get a handle on the file before or after it is downloaded, and then save it to a field in the xpage?
In short, I want to avoid the user downloading the file, then having to attach it manually to the xpage.
Thanks
POI allows you to get a handle to the file using the variable "workbook". You are also able to provide the specific downloadFileName you wish to use. Using the postGenerationProcess property you should be able to make a call to a Java method that makes the connection to your network drive where you can use the "workbook" variable and downloadFileName value to save your document. If this doesn't work definitely post a question on their project site because the creator does reply.

Mac App Sandboxing- Updating files outside the sandbox

I have an Application for the Mac that I want to publish on in the app store.
I order to get it published I need to put in a sandbox.
The app access Sqlite files outside the sandbox which the user selects from a openpanel.
The App works fine when is performs a select but it fails on inserts and updates.
I can remember reading something about some function you could call that could give you write access to files outside the sandbox but for the life I can remember what is was Can anyone enlighten me ?
Regards Christian Arild Stœr Andersen
Add "com.apple.security.files.bookmarks.app-scope" with boolean value YES in entitlement file of your project. Add follow "With Sandboxing" section of this link --
http://cocoaintheshell.com/2012/09/saving-sandboxing/
When you resolve your URL, by using URLByResolvingBookmarkData: method, you will get the url something like this --
file://localhost/Users/XYZ/Downloads/MyAudio.mp3?applesecurityscope=353734653735396237656239646134396537363331633063393765356234363035353666326332393b30303030303030303b3030303034534534343030303032303b636f6d2e6170706c652e6170702d73616e64626f782e726561642d77726974653b30303030303030313b30313030303030323b303030303030303030303035633134613b2f75736572732f69706874656368322f646f776e6c6f616473
For more information search for -- "NSURLBookmarkCreationWithSecurityScope"

How to obtain the config folder/file across platforms under Free Pascal/Lazarus?

Is there a set of functions that give you the file and/or the folder where to place an application's config?
I would like it to return the folder only and/or the file only on the appropriate place for each system.
The functions you are looking for are the following:
GetAppConfigDir - wiki page
GetAppConfigFile - wiki page
Those functions will use the ApplicationName content to determine the name of the application. You can change that behaviour with the OnGetApplicationName callback.
You can have a look at what they return for each system on the Multiplatform Programming Guide wiki page.

Finding the path to a contacts image in Objective-C on the iPhone

I was wondering if there was someway to find the file path of a contacts image?
I'm familiar with the functions ABPersonCopyImageData and ABPersonCopyImageDataWithFormat.
Those don't return the actual path to the image though. I was wondering if this was even possible? Thanks!
It's probably not possible. Even if it were possible, it wouldn't matter, because your application only has access to the files in its own application sandbox. The address book is stored outside of your application's sandbox. So even if you had the path you couldn't access the file.