<?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 Re: How to iterate through floor storage levels? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-iterate-through-floor-storage-levels/m-p/14056688#M100435</link>
    <description>&lt;P&gt;Thank you for your help.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Mar 2026 07:48:57 GMT</pubDate>
    <dc:creator>lukas_ker00</dc:creator>
    <dc:date>2026-03-17T07:48:57Z</dc:date>
    <item>
      <title>How to iterate through floor storage levels?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-iterate-through-floor-storage-levels/m-p/14055735#M100427</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;I want to iterate through the levels of my floor storage. For now, I just want to know if the slot in the level is used (an item is placed here) or not. The FloorStorage has 1 Bay, 10 Levels and 1 Slot per level.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt; I tried to write a simple for-loop to address this issue. My current approch looks like this:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;Storage.Object storage = Model.find("FloorStorage"); 
 
for (int levelNum = 1; levelNum &amp;lt;= 10; levelNum++) {
  
    // Access the slot in the first bay (Bay 1) at the current level
    Storage.Slot test = storage.getSlot(1, levelNum, 1);
    
    // Check if the slot is occupied
    if (test.items.length &amp;gt; 0) {
        print("Level", levelNum, "is used. Item:", test.items[1].name);
    } else {
        print("Level", levelNum, "is EMPTY.");
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everytime I execute this code, I receive the following error message which I can't fix right now with my beginner's knowledge:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;time: 1.000000 exception: FlexScript exception: Invalid access to a Storage.Slot label that does not exist at MODEL:/FloorStorage&amp;gt;variables/onSlotEntry at line 0&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2026 13:05:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-iterate-through-floor-storage-levels/m-p/14055735#M100427</guid>
      <dc:creator>lukas_ker00</dc:creator>
      <dc:date>2026-03-16T13:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to iterate through floor storage levels?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-iterate-through-floor-storage-levels/m-p/14055773#M100428</link>
      <description>&lt;P&gt;in Storgae.Slot there doesn't exist a property "items". "slotItems" is suitable property to get access to an array of stored items.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please look into &lt;A href="https://docs.flexsim.com/en/26.0/Reference/CodingInFlexSim/FlexScriptAPIReference/Warehousing/Storage.Slot.html" target="_blank" rel="noopener"&gt;manual to identify usable properties or methods&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2026 13:42:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-iterate-through-floor-storage-levels/m-p/14055773#M100428</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2026-03-16T13:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to iterate through floor storage levels?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-iterate-through-floor-storage-levels/m-p/14056688#M100435</link>
      <description>&lt;P&gt;Thank you for your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2026 07:48:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-iterate-through-floor-storage-levels/m-p/14056688#M100435</guid>
      <dc:creator>lukas_ker00</dc:creator>
      <dc:date>2026-03-17T07:48:57Z</dc:date>
    </item>
  </channel>
</rss>

