Friday Tips, The SIMUL8 Brain

Friday’s Tip- Changing a work item image using labels

Frances Sneddon  /   Nov 4, 2011

This week’s Friday Tip will show you how to change the image of a work item based on a label value. This is really great for showing different types of work or if you just want to add in some random variety; for example if your work items are people, you may want them to all look different.

label_

Reserved Label Image

SIMUL8 has several reserved label names which are used automatically by SIMUL8. Image: is one of these reserved labels. Image: as its name suggests lets you change the image of a work item.

How it works

If a work item has a numeric label with a name beginning Image: and that label is listed in a work center’s or work entry point’s label actions then SIMUL8 will take the rest of the labels name and add it to the label’s value and look for an image with that name.

Image_

How to create the model

  1. Create 3 images called ball1, ball2, ball3
  2. Create a numeric label called Image:ball Image_ball
  3. In label actions for the work entry point set Image:ball to a rounded uniform distribution with values 1 to 3. final_

Please note that in all cases, the image button in the work center’s graphics dialog has priority over any changes to images made via labels.

What else would you like to learn about labels?

About the author

Frances Sneddon

Frances Sneddon

As Chief Technology Officer for SIMUL8, I am responsible for the strategy and direction of our products, it's also my passion. I love software and every part of what goes into creating an amazing end user experience from the initial connection with our website, to how you interact with the software itself.