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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Can the toolkit read search_path or workspace files?

CHASEONHO
18-Opal

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

5 REPLIES 5

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?

ptc-14051
4-Participant
(To:CHASEONHO)

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.

RPN
17-Peridot
17-Peridot
(To:CHASEONHO)

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.

 

 

ptc-14051
4-Participant
(To:CHASEONHO)

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.

Top Tags