This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.
This is a custom User Command made available to you in a user library. The command can be used to automatically create instances of a library class object, position them in your model and connect their input and output ports to a specified object in your model. This is especially useful for creating a variable number of operators during an experiment and connecting them to a dispatcher.
Unzip contents of downloaded file into the libraries directory. Load library through the File menu of the Flexsim Library window.
Description:
Create or delete instances of the classobj as needed, and connect with fromobj so that there are a total of numobjs connected to the output ports of the fromobj. If a toobj exists, then also connect the output ports of the new instances to the toobj. The relative position of each instance is defined by the xoffset and yoffset values. Each new instance gets a unique color and name based on the fromobj output port it is connected to.
The command is useful for trying a variable number of operators in a simulation experiment as suggested by the example below where the number of operators is defined by a label on the dispatcher object whose OnReset trigger executes the statement.
This is great. But can you make it a little bit more useful so that we can create objects not only under model() but also under other containers, say visual tools? When I was trying to do that, I have issues setting locations of created objects. Thanks.