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 01-17-2016
Bill Bacon
Guest
 
Posts: n/a
Downloads: 0
Uploads: 0
Default Setting item color based on type

Hello,

I'm quite new to FlexSim and am trying to have my Source use a Global Lookup Table to determine the color based on Item Type of 1, 2 or 3. I'm using the OnCreation Trigger and "Set Itemtype and Color" from the picklist, with the Type "gettablenum("GTable", 1, 1)". The Tutorials mention a "Set Color" trigger that doesn't appear in any of the context menus in FlexSim 7, unfortunately. Anything with a Type of 1 would be Green, 2 = Red, 3 = Blue.

Getting the types down will be necessary so that I can then add to the table different arrival rates for each, as well as route the different types to different Processors. I believe this is setting the Types down, but I'm having trouble linking the colors. Could I use the Set Object Color trigger to specify the colors given a particular ItemType?
  #2  
Old 01-17-2016
michaelsmith michaelsmith is offline
TMN Simulation -Australia
 
Join Date: Aug 2007
Location: Hobart Tasmania
Posts: 62
Downloads: 7
Uploads: 0
Thanks: 31
Thanked 19 Times in 12 Posts
Rep Power: 170
michaelsmith will become famous soon enough
Default

You can tell if you are setting the item type by selecting a box and it's properties will show the item type.
Unless you want very specific colours I would be tempted to use the Set Color By Case Trigger using the item type. You must have set the item type before you set the color though.
  #3  
Old 01-18-2016
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

Hello Bill,

you are looking for a function you can't get from templates. You have to change a source code. Maybe you like to set the itemtype by random. That is ok. You can choose a template for this method, but then you have to write the source code on your own from the scratch. Another a approach would be the use of the template "set itemtype and color". There you insert the command gettablenum to get access to the second column of your global table to fetch the color number in dependence to your random type. You find the source code editor under the scroll icon.

Command gettablenum([name as string or rank number of table],[row as number], [column number]) returns a number value of the table cell.

Jörg
Attached Thumbnails
Click image for larger version
Name:	V77-ColorItemtypeLookupByTable.jpg
Views:	795
Size:	433.3 KB
ID:	3143  
The Following User Says Thank You to Jörg Vogel For This Useful Post:
sagar bolisetti (01-18-2016)


Thread Thread Starter Forum Replies Last Post
Getting the color of an animation component (drawsurrogate) to use the color defined in Flexsim Axel Kohonen Tips and Tricks 0 10-13-2015 01:01 AM
Item Type Flow question Wilfredo Salinas Q&A 2 01-30-2015 02:57 PM
Set color of item on transporter Katharina Muller Q&A 1 12-06-2012 05:10 PM
How to set different operation time based on operator type Brandon Zhao Q&A 6 02-20-2012 09:42 AM
Combining More than One item of the same type hani2899 Q&A 2 11-21-2011 02:55 AM


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.