If you try to open a file from Creo, the file for the search path and the work path opens without specifying the location of the file.
Examples of photos
The toolkit requires a path to the file when using ProMdlLoad.
Can the toolkit read a file into a session without specifying a path, such as opening a file in Creo?
This should work in the background.
ProMdlRetrieve has a name and returns its model in memory.
ProMdlnameRetrieve is using ProMdlRetrieve because it is marked as undefined.
Is not that a problem?
Did you ever figure this out? I have the same question: how to retrieve files that are not in session, not in the current working directory, but is in one of the currently loaded search_paths.
Try using ProMdlnameRetrieve.
ProMdlnameRetrieve loads the model in PDM space, working directory, search path order.
If you want to load the model only in Search Path, use ProConfigoptGet to get all lines of search_path.
Then use ProMdlLoad after all the search_path lines are followed by the name of the model.
full_path - The full path of the model to be retrieved,
including the name, and optionally the location
type - The type of the model to retrieve, or PRO_MDL_UNUSED
if full_path includes an extension.
I should have been more explicit. I am using Java Toolkit (not Toolkit or Toolkit C++), my bad. It looka like the java toolkit api only supports retrieving a model that is either in session, in the current working directory, or the path is explicitly defined in the call. Anyway i got it working with a recursion method looping through the search paths.