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: 

A question about Design.findEntityByToken Method

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
nnikbin
345 Views, 2 Replies

A question about Design.findEntityByToken Method

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?

Labels (1)
2 REPLIES 2
Message 2 of 3
KrisKaplan
in reply to: nnikbin

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
in reply to: KrisKaplan

Hi @KrisKaplan 

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

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