<?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: Syntax for PartitionID in List.entries() in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/syntax-for-partitionid-in-list-entries/m-p/13531406#M40200</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;I changed the Object to Token and now line 7 works, but &lt;/P&gt;&lt;PRE&gt;int numsheets = WIPtoken.NumSheets;&lt;/PRE&gt;&lt;P&gt;is bombing out with no error message...&lt;/P&gt;&lt;P&gt;I had to use &lt;/P&gt;&lt;PRE&gt;int numsheets = WIPtoken.labels["NumSheets"].evaluate();&lt;/PRE&gt;&lt;P&gt; So, for anyone following this, the correct syntax is &lt;/P&gt;&lt;PRE&gt;List WIPlist = List("List: Pallets at nsLEPE");
int len = WIPlist.entries("nsLEPE1").length;
if (len&amp;gt;0){
    Token WIPtoken = WIPlist.entries("nsLEPE1")[1].value;
    int numshts = WIPtoken.labels["NumSheets"].evaluate();
    return numshts;
//
}&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 06 Jan 2023 19:57:12 GMT</pubDate>
    <dc:creator>clairekruppGhafari</dc:creator>
    <dc:date>2023-01-06T19:57:12Z</dc:date>
    <item>
      <title>Syntax for PartitionID in List.entries()</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/syntax-for-partitionid-in-list-entries/m-p/13531402#M40196</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 22.2.2 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;I am trying to grab the token in a list partition so that I can get the current value of the label "NumSheets". (It would also work if I can just grab the value of NumSheets directly from the list.)&lt;/P&gt;&lt;P&gt;I am using list.entries() but no matter what I put inside the () (nothing, a number, or a string) it tells me that the list is empty.&lt;/P&gt;&lt;P&gt;Here is my test code and the status of the list when I am executing the script:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1514743i04D9C43260F3C5C5/image-size/large?v=v2&amp;amp;px=999" title="1673022524155.png" alt="1673022524155.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; I have tried entries(), entries(1), and entries("nsLEPE1"), but &lt;SPAN style="color: rgb(65, 65, 65); font-family: sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;it always comes back with len of 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;What is the proper syntax?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 06 Jan 2023 16:38:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/syntax-for-partitionid-in-list-entries/m-p/13531402#M40196</guid>
      <dc:creator>clairekruppGhafari</dc:creator>
      <dc:date>2023-01-06T16:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for PartitionID in List.entries()</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/syntax-for-partitionid-in-list-entries/m-p/13531403#M40197</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;BTW I made it a Global List, so that I could use list.entries().&lt;/DIV&gt;</description>
      <pubDate>Fri, 06 Jan 2023 16:45:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/syntax-for-partitionid-in-list-entries/m-p/13531403#M40197</guid>
      <dc:creator>clairekruppGhafari</dc:creator>
      <dc:date>2023-01-06T16:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for PartitionID in List.entries()</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/syntax-for-partitionid-in-list-entries/m-p/13531404#M40198</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;I wonder if the partition is a node value, so you need to use &lt;/P&gt;&lt;PRE&gt;WIPList.entries(Model.find("nsLEPE1"))&lt;/PRE&gt;&lt;P&gt;If the partition value is a string value, then the screenshot you shared is missing a "1" on the end of "nsLEPE1".&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 06 Jan 2023 17:45:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/syntax-for-partitionid-in-list-entries/m-p/13531404#M40198</guid>
      <dc:creator>JordanLJohnson</dc:creator>
      <dc:date>2023-01-06T17:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for PartitionID in List.entries()</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/syntax-for-partitionid-in-list-entries/m-p/13531405#M40199</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Thanks &lt;A rel="user" href="https://answers.flexsim.com/users/220/jordan.j.html" nodeid="220"&gt;@Jordan Johnson&lt;/A&gt; , the "Model.find" did not work, but the typo correction did! &lt;/P&gt;&lt;P&gt;Hopefully it will still work when I pass in "token.ProcessName" instead of the text string.&lt;/P&gt;&lt;P&gt;But then in line 7 &lt;/P&gt;&lt;PRE&gt;Object WIPtoken = WIPlist.entries("nsLEPE1")[1].value;&lt;/PRE&gt;&lt;P&gt;gives an "Invalid down cast" error.&lt;/P&gt;&lt;P&gt;I copied the placement of the [1] from the user manual, but maybe something else is needed?&lt;/P&gt;&lt;P&gt;Or is the value on the list (a token) not an Object?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 06 Jan 2023 19:08:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/syntax-for-partitionid-in-list-entries/m-p/13531405#M40199</guid>
      <dc:creator>clairekruppGhafari</dc:creator>
      <dc:date>2023-01-06T19:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for PartitionID in List.entries()</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/syntax-for-partitionid-in-list-entries/m-p/13531406#M40200</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;I changed the Object to Token and now line 7 works, but &lt;/P&gt;&lt;PRE&gt;int numsheets = WIPtoken.NumSheets;&lt;/PRE&gt;&lt;P&gt;is bombing out with no error message...&lt;/P&gt;&lt;P&gt;I had to use &lt;/P&gt;&lt;PRE&gt;int numsheets = WIPtoken.labels["NumSheets"].evaluate();&lt;/PRE&gt;&lt;P&gt; So, for anyone following this, the correct syntax is &lt;/P&gt;&lt;PRE&gt;List WIPlist = List("List: Pallets at nsLEPE");
int len = WIPlist.entries("nsLEPE1").length;
if (len&amp;gt;0){
    Token WIPtoken = WIPlist.entries("nsLEPE1")[1].value;
    int numshts = WIPtoken.labels["NumSheets"].evaluate();
    return numshts;
//
}&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 06 Jan 2023 19:57:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/syntax-for-partitionid-in-list-entries/m-p/13531406#M40200</guid>
      <dc:creator>clairekruppGhafari</dc:creator>
      <dc:date>2023-01-06T19:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for PartitionID in List.entries()</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/syntax-for-partitionid-in-list-entries/m-p/13531407#M40201</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Use "Token" instead of "Object"&lt;/P&gt;&lt;PRE&gt;Token WIPToken = WIPlist.entries("nsLEPE1")[1].value;&lt;/PRE&gt;&lt;P&gt;The values on the list are tokens rather than objects. You can tell because the value field shows "instance" and "id", which it only does for tokens.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 06 Jan 2023 19:57:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/syntax-for-partitionid-in-list-entries/m-p/13531407#M40201</guid>
      <dc:creator>JordanLJohnson</dc:creator>
      <dc:date>2023-01-06T19:57:50Z</dc:date>
    </item>
  </channel>
</rss>

