<?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: Error after updating FlexSim in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/error-after-updating-flexsim/m-p/13534434#M42603</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;I have gone through this again. I don't get any errors.&lt;/P&gt;&lt;P&gt;I have build a model in 20.1.2 and let it run in 20.2.3. I don't still see any errors.&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/temp/33546-multidim-array-20-1.fsm" target="_blank"&gt;multidim_array_20_1.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 21 Oct 2020 14:08:43 GMT</pubDate>
    <dc:creator>joerg_vogel_HsH</dc:creator>
    <dc:date>2020-10-21T14:08:43Z</dc:date>
    <item>
      <title>Error after updating FlexSim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/error-after-updating-flexsim/m-p/13534431#M42600</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 20.2.3 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I've just updated from 20.1.3 to the newest version.&lt;/P&gt;
 &lt;P&gt;At some point in my model I need to access a 2D array.&lt;/P&gt;
 &lt;P&gt;I simply use bracket syntax, MyArray[row][col] but FlexSim throws this error:&lt;/P&gt;
 &lt;P&gt;FlexScript exception: Invalid variant type used with [] array operator&lt;/P&gt;
 &lt;P&gt;It used to work just fine.&lt;/P&gt;
 &lt;P&gt;Specifically I use two labels of a 3D object as the indices of the 2D-array. Something like this:&lt;/P&gt;
 &lt;PRE&gt;int duration = Durations[room.Day][room.Booking_number];&lt;/PRE&gt;
 &lt;P&gt;where the labels "Day" and "Booking_number" were created as:&lt;/P&gt;
 &lt;PRE&gt;room.Day = 1;
room.Booking_number = 1;&lt;/PRE&gt;
 &lt;P&gt;I tried to convert the labels to variant:&lt;/P&gt;
 &lt;PRE&gt;Variant row = room.Day;
Variant col = room.Booking_number;
int duration = Durations[room.Day][room.Booking_number];&lt;/PRE&gt;
 &lt;P&gt;but without any success.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 Oct 2020 13:00:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/error-after-updating-flexsim/m-p/13534431#M42600</guid>
      <dc:creator>thomas_jr</dc:creator>
      <dc:date>2020-10-21T13:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Error after updating FlexSim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/error-after-updating-flexsim/m-p/13534432#M42601</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;And you are absolutely sure, that duration is 2-dimensional array like&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;[[1,2,3],[4,5,6],[0,1,0]]&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;, because &lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/temp/33561-read-values-of-2dim-array.fsm" target="_blank"&gt;read_values_of_2dim_array.fsm&lt;/A&gt;works in FlexSim 20.2.3&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 Oct 2020 13:30:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/error-after-updating-flexsim/m-p/13534432#M42601</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2020-10-21T13:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error after updating FlexSim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/error-after-updating-flexsim/m-p/13534433#M42602</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/461/joerg.v.html" nodeid="461"&gt;@Jörg Vogel&lt;/A&gt;&lt;/P&gt;
 &lt;P&gt;Actually, Duration is also a label of some object, being initialized as&lt;/P&gt;
 &lt;PRE&gt;int n = 10;
someObject.Duration = Array(n);&lt;/PRE&gt;
 &lt;P&gt;Afterwards I push entries to each main entry like this&lt;/P&gt;
 &lt;PRE&gt;someObject.Duration[1].push(35.32);
someObject.Duration[1].push(17.12);
someObject.Duration[1].push(97.38);
someObject.Duration[2].push(3.12);
someObject.Duration[2].push(321.38);
someObject.Duration[3].push(48.32);
...&lt;/PRE&gt;
 &lt;P&gt;There are also some entries in the main list to which I don't push any values, e.g. someObject.Duration[5] is empty.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 Oct 2020 13:41:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/error-after-updating-flexsim/m-p/13534433#M42602</guid>
      <dc:creator>thomas_jr</dc:creator>
      <dc:date>2020-10-21T13:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error after updating FlexSim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/error-after-updating-flexsim/m-p/13534434#M42603</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;I have gone through this again. I don't get any errors.&lt;/P&gt;&lt;P&gt;I have build a model in 20.1.2 and let it run in 20.2.3. I don't still see any errors.&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/temp/33546-multidim-array-20-1.fsm" target="_blank"&gt;multidim_array_20_1.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 Oct 2020 14:08:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/error-after-updating-flexsim/m-p/13534434#M42603</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2020-10-21T14:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error after updating FlexSim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/error-after-updating-flexsim/m-p/13534435#M42604</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Perhaps you must declare the value of label room.Day to be of the datatype number as int or double. &lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 Oct 2020 14:20:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/error-after-updating-flexsim/m-p/13534435#M42604</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2020-10-21T14:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Error after updating FlexSim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/error-after-updating-flexsim/m-p/13534436#M42605</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/461/joerg.v.html" nodeid="461"&gt;@Jörg Vogel&lt;/A&gt;,&lt;/P&gt;
 &lt;P&gt;Think I found out why. Somehow my model tried to access someObject.Duration where the length of the list is 0.&lt;/P&gt;
 &lt;P&gt;Still, I wonder why FlexSim didn't complain about an arrayoutofboundexception while instead complaining about an invalid Variant type being used.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 Oct 2020 14:34:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/error-after-updating-flexsim/m-p/13534436#M42605</guid>
      <dc:creator>thomas_jr</dc:creator>
      <dc:date>2020-10-21T14:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Error after updating FlexSim</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/error-after-updating-flexsim/m-p/13534437#M42606</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/13440/thomasjr.html" nodeid="13440"&gt;@Thomas JR&lt;/A&gt;, was Jörg Vogel's answer helpful? If so, please click the red "Accept" button on their answer. Or if you still have questions, add a comment and we'll continue the conversation.&lt;/P&gt;&lt;P&gt;If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Oct 2020 14:57:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/error-after-updating-flexsim/m-p/13534437#M42606</guid>
      <dc:creator>Ben_WilsonADSK</dc:creator>
      <dc:date>2020-10-23T14:57:22Z</dc:date>
    </item>
  </channel>
</rss>

