I have a source that creates a token once a variable on my Task executer changes. When this happens I want to reduce the speed of the task executer I am using Astar. What is the correct syntax in the custom code? Is it "Object.setProperty"?
I have a source that creates a token once a variable on my Task executer changes. When this happens I want to reduce the speed of the task executer I am using Astar. What is the correct syntax in the custom code? Is it "Object.setProperty"?
Yes, it's either
Object.setProperty("MaxSpeed", <newValue>);
or
Object.setVariable("maxspeed", <newValue>);
Be aware that the change will only take effect at the start of the next travel task.
i am getting Invalid type (invalid) for call to method setVariable
Based on the screenshot in your post, that would be "token.Bolt" in your case. If you still get an error message try adding ".as(Object)" into the command like this:
token.Bolt.as(Object).setVariable("maxspeed", 0.5)
7 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