Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

When does the entityToken change?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
j.goenner
302 Views, 2 Replies

When does the entityToken change?

Hello,

When does the entityToken parameter of a BRepBody and Occurrence change?

In the Fusion help it is just written that it can be different over time, but does it only change when you edit the body, when you close and open the file or just randomly over time?

Labels (1)
  • API
2 REPLIES 2
Message 2 of 3
KrisKaplan
in reply to: j.goenner

Hi,

 

Different entities may have very different entity token behaviors as far as their exact value goes. But the token for a BRepBody will be stable across body topology changes (unlike the face, edge, vertex topology entities). The token for an Occurrence is also fairly stable, and will normally only change with some restructure operations along the occurrence path (demotion/promotion on interior nodes of the occurrence path).

 

However, the precise value of entity tokens is implementation specific. And the implementation can be expected to change across releases. So there should be no expectation that a token generated for an entity in one version of the software will be identical to a token created on the same entity in a different version. You should make no assumptions about the exact value of a token, and should really not compare them as an equality check. To compare if two tokens are for the same entity, you should bind them to the entity (findEntityByToken) and compare the resulting entities for equality. (If two tokens are identical, they definitely are to the same entity. But you cannot assume that two different tokens are not to the same entity without binding the tokens first.)

 

Kris



Kris Kaplan
Message 3 of 3
j.goenner
in reply to: KrisKaplan

Thanks a lot for the quick reply.

I didn't plan to compare them, I just wanted to know how quickly you would get the same object multiple times in a list with different entity tokens, but it seems like it isn't a problem then.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report