question

Simone F avatar image
0 Likes"
Simone F asked Simone F commented

Paint slot labels using process flow/script

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!

FlexSim 20.2.2
processflowflexsim 20.2.2scriptpaint slot labels
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

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Simone F commented

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[n];
         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.

· 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.

Simone F avatar image Simone F commented ·

Thank you!

0 Likes 0 ·