question

Enrique Elizaga avatar image
0 Likes"
Enrique Elizaga asked Enrique Elizaga commented

How to change slot color?

Hi,

I am querying and changing slot labels with code. When I reset the model, these labels are switching back to a previous value. How can I change these "resetLabels"? Currently I am doing it like this:

slots[n].labels.assert("PROXIMITY").value = 4;
slots[n].find("/resetLabels").subnodes[1].value = 4;

Is this correct?

Once changed though, the slot colors seem unchanged when I activate the paint tool even after resetting the model. The slot labels have chenged but their associated colors haven't. Here my example:

1623701918552.pngBefore changing the slot label


1623701976084.pngAfter changing the slot label


FlexSim 21.1.1
flexsim 21.1.1floor storagepaint slot labels
1623701918552.png (125.9 KiB)
1623701976084.png (125.9 KiB)
· 2
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·
This, what you see, is the result of a heatmap.
0 Likes 0 ·
Enrique Elizaga avatar image Enrique Elizaga Joerg Vogel commented ·
@Joerg Vogel yes sir! That is what I am creating, to later assign SKUS based on speed.
0 Likes 0 ·
Joerg Vogel avatar image
4 Likes"
Joerg Vogel answered Enrique Elizaga commented

The visualization is a feature of the storage system in the toolbox.colored-slots.png


colored-slots.png (71.1 KiB)
· 2
5 |100000

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

Eric M avatar image Eric M commented ·

Here's a sample model doing what @Joerg was talking about. I just set up a label (Type) and color pallet in the "Slot Labels" tab, then made a new visualization copying the floorstorage and set the Label Reference to Type - Color By Label. Now when the slot labels change, the color will change as well. You can test it by running the script with different "type" values. slot colors.fsm

3 Likes 3 ·
slot-colors.fsm (163.6 KiB)
Enrique Elizaga avatar image Enrique Elizaga commented ·
@Eric M and @Joerg Vogel this is even cooler than just painting slots to assign labels. It can really make the model communicate a bunch of stuff by displaying slot colors based by condition. Tanks a lot!
1 Like 1 ·
Omar Aguilera Rico avatar image
0 Likes"
Omar Aguilera Rico answered Enrique Elizaga commented

R1.fsm

Hello Enrique, the safest thing is that if your code is working but visually the color is not updated. I made an example model, the information in the Tree is updated but not the color in relation to the value of the label.

I'll keep looking to see where I update the color.


r1.fsm (39.1 KiB)
· 1
5 |100000

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

Enrique Elizaga avatar image Enrique Elizaga commented ·
@Omar Aguilera Rico my code already updated the label and reset label for the slots in the tree. My issue is that it does not show in the 3d view.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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