Skip to main content
1-Visitor
July 24, 2017
Question

Creo Toolkit using C

  • July 24, 2017
  • 1 reply
  • 4960 views

How to fetch an Unique ID for .Prt, .Asm, drawing?

1 reply

15-Moonstone
July 25, 2017

They should have a unique id (name + extension/type). If they haven't you have a problem inside your data management. Creo need a unique identifier and uses for this the filename.

 

If you have problems with doubled files you can generate a unique ID by getting the hash value from the file or something like that. 

 

Br,

Eike

Madhavi1-VisitorAuthor
1-Visitor
July 25, 2017

Thanks for reply Eike!

Yah there has to be  unique ID for each file (part,asm,drawing). As if  now I have not found any.

I have tried ProMdlIdGet but it's not persistent between sessions.

If I generate my own unique ID then I will need to add/attach it as a property to the part (or asm/drawing) and later I have to write a fucntion which will return the Part for given unique id.

Pro toolkit is in use for so long and I am sure people must have faced this situation.

I was wondering how did they handle it.

 

Regards,

Madhavi

15-Moonstone
July 25, 2017

As mentioned before ... the filename is the unique id.

 

If you have doubled file names it is not possible to work with Creo with both files at the same time. So the filename should be unique inside your system. If you have PDM/PLM - Windchill it is unique.

 

If you have multiple files with same name (you have a big problem inside of creo with this) or same instance names (same big problem) than you need to find a way for another unique ID (not supported by Creo). You could create one and write it inside a parameter.

 

Br,

Eike