<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How do I find the label names and values for a storage slot? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-find-the-label-names-and-values-for-a-storage-slot/m-p/14108618#M100877</link>
    <description>&lt;P&gt;I have many storage units (a mixture of racks and floor storage) in a model and within any given storage unit, slot labels are the same for all slots.&lt;/P&gt;&lt;P&gt;How can I check the labels on a given slot programatically?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can access a slot on a given storage unit by e.g.:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;string storageName = "MyStorageUnit";
treenode su = Model.find(storageName);
Storage.Slot slot = Storage.system.findSlot("WHERE slot.storageObject == $1", 0, su);&lt;/LI-CODE&gt;&lt;P&gt;But how do I either find the value for a particular slot label, or find all values for all slot labels for this slot?&lt;BR /&gt;I have tried syntax like...&lt;/P&gt;&lt;LI-CODE lang="general"&gt;return slot.slotSKU;&lt;/LI-CODE&gt;&lt;P&gt;...where slotSKU is definitely a valid label applied to all slots in the storage unit, but this gives me the following exception:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;exception: FlexScript exception: MAIN:/project/exec/consolescript c: &amp;lt;no path&amp;gt; i: &amp;lt;no path&amp;gt;&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 28 Apr 2026 08:53:32 GMT</pubDate>
    <dc:creator>sean_tully</dc:creator>
    <dc:date>2026-04-28T08:53:32Z</dc:date>
    <item>
      <title>How do I find the label names and values for a storage slot?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-find-the-label-names-and-values-for-a-storage-slot/m-p/14108618#M100877</link>
      <description>&lt;P&gt;I have many storage units (a mixture of racks and floor storage) in a model and within any given storage unit, slot labels are the same for all slots.&lt;/P&gt;&lt;P&gt;How can I check the labels on a given slot programatically?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can access a slot on a given storage unit by e.g.:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;string storageName = "MyStorageUnit";
treenode su = Model.find(storageName);
Storage.Slot slot = Storage.system.findSlot("WHERE slot.storageObject == $1", 0, su);&lt;/LI-CODE&gt;&lt;P&gt;But how do I either find the value for a particular slot label, or find all values for all slot labels for this slot?&lt;BR /&gt;I have tried syntax like...&lt;/P&gt;&lt;LI-CODE lang="general"&gt;return slot.slotSKU;&lt;/LI-CODE&gt;&lt;P&gt;...where slotSKU is definitely a valid label applied to all slots in the storage unit, but this gives me the following exception:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;exception: FlexScript exception: MAIN:/project/exec/consolescript c: &amp;lt;no path&amp;gt; i: &amp;lt;no path&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 28 Apr 2026 08:53:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-find-the-label-names-and-values-for-a-storage-slot/m-p/14108618#M100877</guid>
      <dc:creator>sean_tully</dc:creator>
      <dc:date>2026-04-28T08:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I find the label names and values for a storage slot?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-find-the-label-names-and-values-for-a-storage-slot/m-p/14108752#M100880</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Find_Slot_Labels.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1636403i3035F827124FDAB6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Find_Slot_Labels.jpg" alt="Find_Slot_Labels.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;Storage.Object rack = Model.find("Rack_A");
Storage.Slot testSlot = rack.getSlot(3,2,1);//getslot: Bay, Level, Slot
Array allSlotLabels = testSlot.as(treenode).find("slotLabels").subnodes.toArray();
print(allSlotLabels);&lt;/LI-CODE&gt;&lt;P&gt;enhanced to flatten all slot labels by a slot query and a table query&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;Array allSlots = Storage.system.querySlots("",0);
Table.query("SELECT $3 AS SLOTLabel FROM $1x$2",
		allSlots.length,
		allSlots[$iter(1)].as(treenode).find("slotLabels"),
		$iter(2)
		).cloneTo(Table("Dump1")); // not necessary as(treenode)
Array allNodes = Table("Dump1").clone();
print(allNodes);&lt;/LI-CODE&gt;&lt;P&gt;here is an example to get slots by label value:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;Array allSlots = Storage.system.querySlots("WHERE slot.storageObject.name = 'Rack_B' AND slot.SKU = 1",0);
print(allSlots);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2026 13:10:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-find-the-label-names-and-values-for-a-storage-slot/m-p/14108752#M100880</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2026-04-28T13:10:44Z</dc:date>
    </item>
  </channel>
</rss>

