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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Toolkit : File versioning + How to check if file/Model is active or opened in Creo

Madhavi
12-Amethyst

Toolkit : File versioning + How to check if file/Model is active or opened in Creo

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?

ACCEPTED SOLUTION

Accepted Solutions
Madhavi
12-Amethyst
(To:lhoogeveen)

@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.

 

View solution in original post

3 REPLIES 3

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.

Madhavi
12-Amethyst
(To:lhoogeveen)

@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.

 

Madhavi
12-Amethyst
(To:Madhavi)

Other option to check whether model is opened or not is: ProMdlWindowGet()
Announcements


Top Tags