Hello,
I have tokens entering a zone. The token can only enter the zone if it has the same label "Label" as the tokens that are already in the zone.
How can I reference these tokens already in the zone and format the Decide node correctly?
Thanks
Hello,
I have tokens entering a zone. The token can only enter the zone if it has the same label "Label" as the tokens that are already in the zone.
How can I reference these tokens already in the zone and format the Decide node correctly?
Thanks
In the Assign Labels activity, there is a pick option for Tokens in Shared Asset that will return an array of all of the tokens that have entered the specified Zone.
Under the hood the picklist is utilizing a command called gettokens() which can be used on any activity or shared asset.
Once you have a reference to all of the tokens you can then check the label value of the entering token with one in the Zone (we don't have to check all of the tokens as they'll all have the same label value). You also have to check to see if there are any tokens in the Zone. The code is:
arraysize(getlabel(token, "tokensInZone")) == 0 || getlabel(getlabel(token, "tokensInZone"), "Label") == getlabel(token, "Label")
I've updated your model to show how it this would work.
10 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved