Paint slot labels using process flow/script

Paint slot labels using process flow/script

simone_f1
Not applicable
31 Views
2 Replies
Message 1 of 3

Paint slot labels using process flow/script

simone_f1
Not applicable

[ FlexSim 20.2.2 ]

Hi,

I'm trying to assign a lable to every slot in the racks. At the moment the solution I found is:

-Go to Toolbox/Storage System/Slot Labels and create a new label (with a palette assigned to semplify the visualization of the label);

-Go to Library/Paint Slot Labels and select the label just created;

-Assign manually the values to the slots;

Is it possible to do this type of assignment using the process flow or a script (maybe using the address of the slot)?

Thank you!

0 Likes
Accepted solutions (1)
32 Views
2 Replies
Replies (2)
Message 2 of 3

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

Yes you just need a slot reference (via a loop) and then set a label value on it. If you run this script you can see how it prints all the slots in the model to the console and assigns the label "SKU" the value "A".

applicationcommand("outputconsole");
clearconsole();
Variant allslots=Storage.system.querySlots("");
for (int n=allslots.length;n>0;n--){
    Storage.Slot thisslot=allslots;
         print (nodetopath(thisslot.as(treenode),1));
     print ("SlotID:" ,thisslot.slotID, " bayID:  "     ,thisslot.bayID, "LevelID: ", thisslot.levelID);
    thisslot.SKU="A";   //  Assign your label and value here.
}

So then you can use the IDs to look up the slot labelling from a table somewhere.

Message 3 of 3

simone_f1
Not applicable

Thank you!

0 Likes