A question about Design.findEntityByToken Method

A question about Design.findEntityByToken Method

nnikbin
Collaborator Collaborator
715 Views
2 Replies
Message 1 of 3

A question about Design.findEntityByToken Method

nnikbin
Collaborator
Collaborator

According to the Fusion API document, the new Design.findEntityByToken Method (many thanks to the team for providing support for Entity Tokens) returns the entity associated with the provided token. But the actual return type is an array of Base class (a std::vector<Base> in C++). Why this method returns an array? Does it return an array with more than one element under certain circumstances?

0 Likes
Accepted solutions (1)
716 Views
2 Replies
Replies (2)
Message 2 of 3

KrisKaplan
Autodesk
Autodesk
Accepted solution

Yes. It's behavior would be similar to that of Attributes. Multiple matches can occur in cases like BRep topology (principally Faces and Edges) after a split. For example, if a token is created for an edge at a point in the timeline, and later in the timeline that edge is split by some feature operation, and then you bind the token it will match to both (or more) split pieces of the edge.

 

FWIW: This is also why tokens created for the same entity could be different. Entities that have a timeline position relative matching behavior will use a different token based on the position of the timeline when it is created.

 

Kris



Kris Kaplan
Message 3 of 3

nnikbin
Collaborator
Collaborator

Hi @KrisKaplan 

Thank you for your comprehensive reply. I even did not know attributes beahve like that!

0 Likes