How do I check the contents of an object (a tote) and make a decision based on it?
Hi Nivedita Ravi,
Since the FlexSim version you are using is FlexSim 16 you have to use the command called content() along with an if structure to make a decision. I have also given the solution for FlexSim 17 version.
In FlexSim 16 Version treenode Queue= node("Queue",model());//Object is a Queue for example with name "Queue" treenode Tote = first(Queue);// Suppose Tote is the first ranked object in the Queue if(content(Tote)<=5) //Decision made based on Tote's content { colorred(Queue)//Colour changed to red colour } In FlexSim 17 Version using Dot Syntax Object Queue = model().find("Queue")//Object is a Queue for example Object Tote = Queue.first;// Suppose Tote is the first ranked object in the Queue if(Tote.subnodes.length<=5) //Decision made based on Tote's content { colorred(Queue)//Colour changed to red colour }
Regards,
Arun KR
5 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