Skip to main content
7-Bedrock
March 15, 2018
Solved

How update session ID after replace part in asm

  • March 15, 2018
  • 3 replies
  • 4791 views

Hi All,

I have asm with a few parts. In this asm I bring parameters from parts using sessions ID (parameter:session_ID).

But after replace part, Creo 4 don't update session ID and I must change session ID manually.

Is it possible to do automatic? By some relations, parameters or something like that? Or you have better idea to get parameters from part into asm?

Best answer by mpazola

Hi All,

I found solution. Instead of session ID is possible to use component ID. Details under link:

https://www.ptc.com/en/support/article?n=CS136660#_ga=2.11654900.1733148465.1528698751-635244285.1527493632

Unfortunate, component ID don't work perfect all the time if, you using replace options by UNRELATED COMPONENT.

Details under link:

https://www.ptc.com/en/support/article?n=CS18597&language=en&posno=1&q=1845369&source=search

 

 

 

 

3 replies

1-Visitor
March 15, 2018

Session ID is based on when a part/assembly is retrieved in a session and is unique for the item during the session.

 

Suppose you had two assemblies in memory and a relation in each one that referred to the same part. If you were to replace a part in one assembly and force the Session ID to change to point to the replacement, then the other assembly would fail.

 

However - the Session ID is how Creo communicates the item to you. Internally they store different information because the Session ID for a component will not be the same from one session of Creo to another. Replacing the component should automatically update the internal reference to point to the replacement and you should not have to change anything.

 

Honestly, I have no idea why PTC ever chose to use or show Session ID to users. It has made things complicated for no typical advantage to the user. The only place I notice that it makes sense is in Repeat Regions, where one might want to index through the models without knowing their name

 

Not updating the relations seems like a bug. I would open a support call with PTC.

12-Amethyst
June 13, 2018

David,

 

Indeed opening session ID to the user was likely not the best UX decision, but it is a long existing one.

As you rightfully noted, Session ID is a one - time shortcut to particular model name, and once this sequence is established it simply means this model name.

Relation that uses Session ID actually goes direct to reference model (part or assembly), irrespective it being inside your assembly or being replaced / restructured out. This relation is not context sensitive, it is "direct reference" type. As mentioned in this thread, if you really seek "context sensitive" relation from top assembly to part - use CID syntax, then it will go to defined CompID and respond to component Replace by updating CID #.

mpazola7-BedrockAuthorAnswer
7-Bedrock
June 12, 2018

Hi All,

I found solution. Instead of session ID is possible to use component ID. Details under link:

https://www.ptc.com/en/support/article?n=CS136660#_ga=2.11654900.1733148465.1528698751-635244285.1527493632

Unfortunate, component ID don't work perfect all the time if, you using replace options by UNRELATED COMPONENT.

Details under link:

https://www.ptc.com/en/support/article?n=CS18597&language=en&posno=1&q=1845369&source=search