Labels of flowitems appear while running

Labels of flowitems appear while running

haneen_a
Not applicable
37 Views
7 Replies
Message 1 of 8

Labels of flowitems appear while running

haneen_a
Not applicable

[ FlexSim 20.2.0 ]

Hello,

I am working on a baggage handling system, The passengers are Flowitems that work as a task executer, the bags are linked to the passengers by the label "Person" that is attached to each bag.

While the model is running, I want each bag to show the label "Person" that has the name of the passenger "PassengerTrack_1".

for example:

the bag that is linked to passenger "PassengerTrack_1" will appear visually while running a bag with the label "PassengerTrack_1" under it.

Thank you,

@Raja Sekaran

@Cliff King

@jason.lightfoot

@Jeff Nordgren

@Mischa Spelt

@Ben Wilson

@Ralf Gruber

@Jeanette F

Traditional.fsm

36423-eb2cbdf1-500d-483b-8c2c-ef6fb2a5fe3b.jpg

36422-4d32ecf1-2485-4753-9d7f-9b6be33008e8.jpg

0 Likes
Accepted solutions (1)
38 Views
7 Replies
Replies (7)
Message 2 of 8

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

I added draw code to the bag to create a line from the bag to the passenger which is I think more useful.

36413-1612113478186.png

traditional_jl.fsm


Message 3 of 8

jason_lightfootVL7B4
Autodesk
Autodesk

You can toggle them on/off by running this line in a script window.

drawPassengerBagConnections=!drawPassengerBagConnections;
Message 4 of 8

jason_lightfootVL7B4
Autodesk
Autodesk

@Haneen A You can make the name of the item appear by using the switch_hidelabel() function on the bag So you rename the bag "Passenger1" and that will appear under the bag.

switch_hidelabel(bag,0);

In the updated model attached I added the custom code activity "Label bag" as shown here:

36449-1612242595668.png

To give this effect:

36450-1612242723700.png

traditional_jl2.fsm

0 Likes
Message 5 of 8

haneen_a
Not applicable
This code is exactly what I was looking for, your help is really appreciated!.

thank you Mr.Jason.

0 Likes
Message 6 of 8

jason_lightfootVL7B4
Autodesk
Autodesk

You're welcome - there is now a fully working version with corrected photo-eye positioning in this post.

0 Likes
Message 7 of 8

haneen_a
Not applicable

Mr.Jason, may I ask where to find the code for the connection you provided?

I would like to remove it from my model but I couldn't find it anywhere, I did a script window to remove it in each run, yet it is annoying to use the script in each run.

Thank you.

0 Likes
Message 8 of 8

jason_lightfootVL7B4
Autodesk
Autodesk

You can remove it from the bag object tree under behaviour node or set the global variable to zero or toggle it in a script like this

drawPassengerBagConnections=!drawPassengerBagConnections
0 Likes