ATTENTIONThis 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. |
flexsim.com |
#1
|
|||
|
|||
Dynamic Scripting itemtype
Hi,
We are creating a dynamic model through flexsim script, have automatically created source, Queue, Dispatcher, Racks and Transporter and connected all of them together as per our least requirement and our model is working fine. Currently source is generating item with out item type as per default setting of source with the default arrival rate. We want to setitemtype and setcolor of items exiting source through script, manually it could have been achieved by writing setitemtype and setcolor script in onexit trigger of the source. This script we are writing on GUI button section, when you press it, everything will be done automatically. I have gone through command section but could not find how to do it using flexsim script. Basically itemtype and color script should be automatically written in designated source trigger on exit section and same for interarrival time. Any help is deeply appreciated. Regards Shashank Trivedi |
#2
|
||||
|
||||
Take the following steps:
Get a pointer to the exittrigger node (using getvarnode) Fill the node with your code (using setnodestr) If the node is not already a flexscript node, toggle it (using switch_flexscript) Build the node (using buildnodeflexscript) Good luck! |
The Following User Says Thank You to Steven Hamoen For This Useful Post: | ||
arunkrmahadeva (12-16-2014) |
#3
|
|||
|
|||
Another way could be to put the values into labels and just have static code read the label values. Then you just set label numbers in your code/GUI or even coldlink to them.
Also, if you want to set values in a scenario or via optquest it'll probably be better to have a numeric node you can point to. |
Tags |
automatic, dynamic, itemtype |
Thread | Thread Starter | Forum | Replies | Last Post |
How to display dynamic text next to an object | Cliff King | Tips and Tricks | 4 | 11-11-2010 01:45 PM |
Can i divide a itemtype? | wilmermoncada | Q&A | 2 | 11-27-2009 08:41 AM |
Get itemtype for a flowitem in a task | KelvinHo | Q&A | 4 | 10-21-2009 09:47 PM |
how to get number of itemtype | Vic Li | Q&A | 11 | 08-19-2009 11:20 PM |
Dynamic script generation: Good Example with a User Command | Naresh Yamani | Tips and Tricks | 2 | 05-16-2008 06:54 PM |