Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hello,
Is it possible to get session id of a model using toolkit?
Thanks in advance.
Regards
Ketan
Hi Ketan -
I'm going to assume from the tags on your post that you are asking about Creo Parametric Toolkit (formerly known as Pro/Toolkit).
Is it possible to get session id of a model using toolkit?
Take a look at ProMdlIdGet. This quote is from Creo Parametric Toolkit's Models and Model Items page:
A third way to identify a model is by an integer identifier. Unlike the integer identifiers of objects within a model, such as surfaces and edges, the identifier of a model is not persistent between PTC Creo Parametric sessions. The function ProMdlIdGet() provides the identifier of a model, given its ProMdl handle.
The phrase "not persistent between sessions" indicates to me that the returned value is a session ID.
|+| M a r k |+|
That's the model's ID, but that sort of ID you use in conjunction with a type (i.e. part id 2 vs. assembly id 2). I suspect the request here is for the independent-of-type session id sometimes known as the postfix id, which can be used (for example) to call out a parameter from a specific model, '&PARAM:5'. For this, the function is ProSolidToPostfixId.
Correct.. Your assumption is exactly meeting what I was looking for.
I will give a try to the function suggested by you tomorrow.
Thanks a lot for this..
Regards
Ketan