question

Lou Keller avatar image
0 Likes"
Lou Keller asked Ben Wilson answered

How can I use various Item shapes in the same model?

In the attached model, I've added two Item Object shapes, a bottle and a file folder.

In Activity 41 a lab sample is created, placed on the patient's bedside table, and then carried to "LabIn" by the Lab tech. That item should be represented by the flow item, "Bottle," found in the flow item bin.

In activity 52, a medical record is created and deposited in the patient room's outbox. The Registration clerk them picks up the Item and takes it to the medical records storage area. The Item should be represented by the item "MedRecd," found in the flow item bin.

In the first case, no Item shape appears when the model is running. In the second case, the Registration Clerk picks up the Lab Sample Bottle and takes it to storage.

So, here are my questions.

  1. How do you specifically designate what shape should be used for an "Item" in a model? According to the manual write-up, graphics should be listed in "Preloaded Shapes and Images," under View>Media Files but I haven't been able to get the file to record any shapes at all.
  2. In the Advanced Function, Item Created Trigger, "Set 3D shape" option, what does the "Shape Index Number" refer to?

using-labels.fsm

FlexSim HC 5.1.0
flexsim hcitem objectssend itemitem object shapes
using-labels.fsm (7.5 MiB)
5 |100000

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

1 Answer

Ben Wilson avatar image
1 Like"
Ben Wilson answered

FlexSim HC 5.1 does not have a mechanism to choose which item (from the Toolbox's Items list) will be created by a Send Item activity. It will always just create whatever item is ranked first in the Toolbox's Items list.

This being the case, you will need to use the activity's Advanced Functions > Item Created Trigger to manually modify your items as they are created.

I've updated your model (attached) to manually modify the items that are created.

As noted above, the items that are created are always taken from the first item in the list. Your model already included a correctly sized bottle with the right 3D file (see the other answer posted by @Jörg Vogel for adding new shapes to the model), etc., as the first item in the Toolbox's Items list, so for Activity 41, the item is created correctly by default.

For Activity 52, you want to create a MedicalRecord item. Since the Send Item activity creates a bottle, we need to modify the item using the activity's Advanced Functions > Item Created Trigger.

Above is the Item Created Trigger for Activity 52. The first thing is to set the right shape. For the MedicalRecord item, we simply want a box. As noted in the description text for the Set 3D Shape option, its best to use the getshapeindex() command to set the shape.

Next up we set the size and location of the "box" so that it is more flat like a file folder, and its located in our receptionist's arms.

Finally, we have to modify 6 of the item's offset values to, basically, get them back to the default values. The bottle shape had to have some crazy size and location offsets built in for it to work properly in FlexSim. Since the MedicalRecord item starts as a bottle shape, we have to roll back those customizations made to handle the bottle..


5 |100000

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