Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi,
I need to userdtand how creo treats files.
Lets say there are two file for Part
1. FirstPart.prt
2. FirstPart.prt.2
then which file creo uses to open the Model FirstPart?
I want to update a model using Toolkit and before that
I must check if specific model is already opened in Creo or not?
Could someone tell me which function to use?
Solved! Go to Solution.
@lhoogeveen Thanks for the reply!
The explanation gave was helpful. 🙂
In Creo (recent files's list) you see the file name without version.
Same is when we open the model from Toolkit; we just need to give the filename without version. So that made me think what happens if there is a file with ext but without version.
I was playing with few files recently and yes it always takes the latest version.
Well about the second quetion:
fucntion ProSessionMdlList can be used to get list of all open models.
And if we need to check for specific model then just get this list and see if our model is there or not.
That is what I am going to use as a solution.
FYI: ProMdlModificationVerify() would check if the model was modified from last save or not.
Hopefully this example helps:
Create and Save part1.prt to Working Directory location (Windows file created as part1.prt.1)
Modify and Save part1.prt to Working Directory location (Windows file created as part1.prt.2)
Close Part1 and Erase Not Displayed
Open part1.prt from Working Directory location (part1.prt.2 will get opened into Creo)
Modify and Save part1.prt to Working Directory location (Windows file created as part1.prt.3)
If you take the initial part1.prt.1 and manually change it to part1.prt.4, this is the file that Creo would open next time. Creo looks for the highest number.
You should verify this with your own testing.
You can see how a folder could quickly become quite large and full of old copies of files. Creo's purge funtionality is a great way to keep only the latest files availalble if you want to purge/delete all the old copies.
No idea about your Toolkit question.
@lhoogeveen Thanks for the reply!
The explanation gave was helpful. 🙂
In Creo (recent files's list) you see the file name without version.
Same is when we open the model from Toolkit; we just need to give the filename without version. So that made me think what happens if there is a file with ext but without version.
I was playing with few files recently and yes it always takes the latest version.
Well about the second quetion:
fucntion ProSessionMdlList can be used to get list of all open models.
And if we need to check for specific model then just get this list and see if our model is there or not.
That is what I am going to use as a solution.
FYI: ProMdlModificationVerify() would check if the model was modified from last save or not.