From the user manual:
In general, to check if a treenode is null just compare the treenode with NULL or put it directly in an if statement. Note that the keyword nullvar represents a null Variant and is not the same as a null treenode.
treenode fred = model().find("doesnotexist"); return fred == NULL; // true return fred == nullvar; // false return tonum(fred); // 0 if (fred) return 1; else return 0; // 0 if (objectexists(fred)) return 1; else return 0; // 0
You should read the rest of the section under Null Values on this user manual page https://docs.flexsim.com/en/19.2/Reference/CodingInFlexSim/FlexScriptAPIReference/Tree/treenode.html..
13 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