In addition to User Commands, I create a number of model scripts via the Script Console. I would like to call some of them directly via Button OnPress events. How do I do that without having to create a User Command first? Thanks.
In addition to User Commands, I create a number of model scripts via the Script Console. I would like to call some of them directly via Button OnPress events. How do I do that without having to create a User Command first? Thanks.
You can add a node in the tree with FlexScript data and call nodefunction() on it, or you can copy it into a text node and call executefsnode() on it, or you can put it in a string somewhere and call executestring() on it, or you can create a user command, as you are aware. You can also copy/paste the code into your Button's OnPress code.
A user command is the best option for storing reusable code in the model to be called from multiple places. Why would you not want to "create a User Command first"? Your qualification makes no sense; a user command does exactly what you want to do. I don't understand.
14 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