Hello,
I woul like to ask if it is possible to check if specific label on token exists or not?
Thank you.
token.labelName? will return NULL if the label does not exist and the value of the label if it does. Note that there is no difference in the return value between a label that does not exist and an empty pointer label.
Similar to that is using token.labels.assert("labelName", initValue).value. This checks if the label exists. If it does, it returns the value. If not, it creates the label and sets its value to 'initValue' and returns that.
Lastly, if you are not interested in the value of the label (if it exists), you can use objectexists(token.labels["labelName"]). This checks if a label node with the given name exists and returns either 1 (true) or 0 (false).
14 People are following this question.
Is it possible to set token colors in Process flow visualisation using values in a table?
Is it possible to add child tokens in subflows onto the parent token trace history?
token creation in AGV process flow at 2018 version
How can I know if there is at least one token in an activity from process flow?
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