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

How to load the latest version of asm&prt files in Java toolkit,without close the opened assembly

Graff
4-Participant

How to load the latest version of asm&prt files in Java toolkit,without close the opened assembly

Creo parametric 7.0.0.0 

No windchill

Java toolkit

User case:

1. Creo window 1: opened assembly in creo like this:

top.asm.1

|--------sub1.asm.1

               |--------part.prt.1

2.Creo window 2: opened  assembly in creo like this:

sub1.asm.1

               |--------part.prt.1

3.Creo window 3: opened part in creo like this:

part.prt.1

3.Put the latest version files(sub1.asm.2 part.prt.2) into the file directory;

Question:

1.Which API can load the latest or specified file version without close the window 1,2,3;

2.Do not close all the files and reload ,because the feeling is not good;

3.The best way I want :Load only the necessary new version files.

Thanks!

ACCEPTED SOLUTION

Accepted Solutions
GabrielZaha
13-Aquamarine
(To:Graff)

I think you will need to explain better what Creo window 1, 2 3 means: Are these  3 windows of the SAME Creo session or you are talking about 3 different Creo sessions on the same workstation?

 

If everything is running in the same Creo session then once you update a model in one window all the changes are immediately visible in all other windows. For a J-Link or toolkit application it has no relevance if the model is displayed in any window or not..

 

If running multiple Creo sessions at the same time, things are getting more complicated. One way to do it is to suppress the component that was changed and all the dependent children's, perform an "Erase not displayed" command and resume all components previously suppressed. This will force the system to read the latest version from disk. In large assemblies, with multiple levels of sub-assemblies this kind of procedure can get really difficult to implement.

View solution in original post

7 REPLIES 7
RPN
17-Peridot
17-Peridot
(To:Graff)

If you load a file into session you load a string name and an integer type. This combination must be unique in session.

 

  • If you omit on open the increment, you will open the file with the highest increment.
  • specify the increment, will open exact this one
  • After loading, only the run time ID of the file is important
  • The model name is used for some relation or on save after loading 
  • the given path is only used on save
  • open a file where name and type already exist will return an error without loading the file, a different path is ignored during this check 
  • erase a name and type in session, can be done, if this one has no parent 
  • On save the model incr is modified by incr to the highest incr on disc plus 1
  • Replace a model in session is reserved to PTC as far I knew 😞
  • Analyse of Parent Cild relations is supported
  • Write something like this on an iPad is painful 😣 

Some simplified tables

 

If Model Type prt is 1, asm is 2 and drw is 3

Parent 0 is your session at all

 

Load  C:/Models/box.prt.5

Run Time ID Parent ID Model Name wchar Model Type int Model Path wchar  Model Incr
1 0 BOX 1 C:/Models 5

 

loading the drawing x342.drw.8 of box.prt may result in

1 2 BOX 1  C:/Models 5
2 0 X342 3  C:/Drawings 8

 

Now open the assembly mymach.asm.7 where box.prt is a member

1 2 BOX 1 C:/Models 5
2 0 X342 3 C:/Drawings 8
3 0 MYMACH 2 C:/AssyType1 7
1 3 BOX 1 NULL NULL

 

Each Window has an ID but no relevance for loading, you can’t have the same model displayed twice. 

Graff
4-Participant
(To:RPN)

Replace a model in session is reserved to PTC as far I knew 😂🤣

————————————————————————————————

It sound sad, but it is understandable that this feature is used for integrating PDM and CAD.

Once the CAD model on the server is updated, the local opened CREO needs to load the updated model

 

 

Graff
4-Participant
(To:Graff)

Cannot be replaced, because the assembly relationship needs to be maintained.

Hello @Graff,

 

It looks like you have a response from a community member. If it helped you solve your question please mark the appropriate reply as the Accepted Solution. 
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Community Moderation Team.

Graff
4-Participant
(To:vnamboodheri)

I didn't get an answer.I need help.

GabrielZaha
13-Aquamarine
(To:Graff)

I think you will need to explain better what Creo window 1, 2 3 means: Are these  3 windows of the SAME Creo session or you are talking about 3 different Creo sessions on the same workstation?

 

If everything is running in the same Creo session then once you update a model in one window all the changes are immediately visible in all other windows. For a J-Link or toolkit application it has no relevance if the model is displayed in any window or not..

 

If running multiple Creo sessions at the same time, things are getting more complicated. One way to do it is to suppress the component that was changed and all the dependent children's, perform an "Erase not displayed" command and resume all components previously suppressed. This will force the system to read the latest version from disk. In large assemblies, with multiple levels of sub-assemblies this kind of procedure can get really difficult to implement.

Graff
4-Participant
(To:GabrielZaha)

Thanks.

Creo window 1,2,3 running in same session. I got the answer from your response.

 

Announcements


Top Tags