cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Can the toolkit read search_path or workspace files?

Can the toolkit read search_path or workspace files?

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

1.png2.png3.png
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.

 

Thanks,

Warm Regards,

SeonHo

Tags (4)
5 REPLIES 5

Re: Can the toolkit read search_path or workspace files?

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?

Re: Can the toolkit read search_path or workspace files?

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.

Re: Can the toolkit read search_path or workspace files?

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.

Re: Can the toolkit read search_path or workspace files?

Use ProMdlLoad/ProMdlFiletypeLoad

 

Input Arguments:

      full_path    -  The full path of the model to be retrieved,

                      including the name, and optionally the location

                      and extension.

      type         -  The type of the model to retrieve, or PRO_MDL_UNUSED

                      if full_path includes an extension.

 

 

Re: Can the toolkit read search_path or workspace files?

Thanks!

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.