Paul Toone avatar image
Paul Toone posted

Sample Itemtype Example   

In this example, we'll show you how to change a processor's routing based on an item's itemtype.

Create a Simple Model

  • Create the simple model as shown above.
  • Double-click on the Source to open its properties window.
  • Go to the Triggers tab and press the next to the OnCreation trigger and select the Set Itemtype and Color option.
  • Leave the values at their default and press the Ok button on the Source Properties Window to apply the change and close the window.

Sample an Item

  • Reset and run the model until an item appears.
  • Stop the model.
  • Click on the Processor to display it's properties in the Quick Properties window.
  • Under the Output section of the Quick Properties, click the next to Send to Port to enter "Sample Mode".

  • Click on the item in your 3D view and the following menu will appear:

  • Select the getitemtype(item) option.

The Sampler will automatically insert the correct line of code for referencing the item's itemtype into the Send to Port picklist.

Reset and Run the model to see how it works.

Note: You may also open the Flowitem Bin and Sample flow items from there. If you are sampling labels on a Flowitem, keep in mind that the options the Sampler will give contain all of the labels on all of your Flowitems. It does not distinguish between flow items.

flexsim users manual
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.



paul.t contributed to this article


FlexSim 2016.1