ATTENTION

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.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 05-25-2011
shashanktrivedi shashanktrivedi is offline
Flexsim User
 
Join Date: Apr 2011
Posts: 59
Downloads: 26
Uploads: 0
Thanks: 26
Thanked 16 Times in 3 Posts
Rep Power: 122
shashanktrivedi will become famous soon enough
Default 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  
Old 05-25-2011
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

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  
Old 05-25-2011
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

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.
  #4  
Old 05-25-2011
shashanktrivedi shashanktrivedi is offline
Flexsim User
 
Join Date: Apr 2011
Posts: 59
Downloads: 26
Uploads: 0
Thanks: 26
Thanked 16 Times in 3 Posts
Rep Power: 122
shashanktrivedi will become famous soon enough
Default

Thanks Steven and Jason, we are trying your suggestion.

Regards
Shashank Trivedi

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


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.