<?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: Assign string array to token label in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484640#M3461</link>
    <description>&lt;P&gt;If you can, I'd assign the string values of the array using an Assign Labels activity, rather than just initiating it via code.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Feb 2017 16:36:03 GMT</pubDate>
    <dc:creator>sam_stubbsYXX86</dc:creator>
    <dc:date>2017-02-07T16:36:03Z</dc:date>
    <item>
      <title>Assign string array to token label</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484635#M3456</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Is there way to assign string array to token label? I have:&lt;/P&gt;
&lt;PRE&gt;stringarray TabID= makearray(10);
intarray TabIle= makearray(10);

//here I filled array with string and integer values
//and now I try to assign arrays to labels

setlabel(token,"CoUzupelnic",TabID); // is error

setlabel(token,"IleUzupelnic",TabIle); // is ok

thanks in advance for advices
&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Feb 2017 11:36:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484635#M3456</guid>
      <dc:creator>michal_klodawski</dc:creator>
      <dc:date>2017-02-07T11:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Assign string array to token label</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484636#M3457</link>
      <description>&lt;P&gt;I'm not sure which version you are using, that will make a difference.  For example, in the most recent version of FlexSim (2017) the "intarray" and "stringarray" types are no longer used as such.  Instead there is just an Array object type, that can be filled with other object type values (including other Array types).    &lt;/P&gt;&lt;P&gt;But either way, you should be able to make any label on a token an array of values using the Assign Labels activity:  (IN the value field under the picklist option Array &amp;gt; you will find all of the options for different ways to assign array values to your label.)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="5034-stringarray.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1494938iE415AF035B9C72C2/image-size/large?v=v2&amp;amp;px=999" role="button" title="5034-stringarray.png" alt="5034-stringarray.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 13:00:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484636#M3457</guid>
      <dc:creator>sam_stubbsYXX86</dc:creator>
      <dc:date>2017-02-07T13:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Assign string array to token label</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484637#M3458</link>
      <description>&lt;P&gt;Hi, thanks for reply, I have FLexSim 2016 update 2. Array type is not available yet. I've tried to create new label with array of string as you said but I have still the same exception as earlier. It is appearing when I click on token to see its labels after assigning string array to label:&lt;/P&gt;
&lt;PRE&gt;exception: Exception caught in TreeNode::callMemberFunction() c++/dll execution. Throwing... VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties/TableView&amp;gt;eventfunctions/setFocus c: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties/TableView thisClass: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties/TableView
exception: Exception caught in flexscript execution of VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties&amp;gt;eventfunctions/onSelObjChange line 7 instruction 22. Discontinuing execution.
exception: Exception caught in TreeNode::callMemberFunction() flexscript execution VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties&amp;gt;eventfunctions/onSelObjChange c: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties theclass: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties
exception: treewin__OnPaint
ex: OnPaint
exception: Exception caught in TreeNode::callMemberFunction() c++/dll execution. Throwing... VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties/TableView&amp;gt;eventfunctions/setFocus c: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties/TableView thisClass: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties/TableView
exception: Exception caught in flexscript execution of VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties&amp;gt;eventfunctions/onSelObjChange line 7 instruction 22. Discontinuing execution.
exception: Exception caught in TreeNode::callMemberFunction() flexscript execution VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties&amp;gt;eventfunctions/onSelObjChange c: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties theclass: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties
exception: treewin__OnPaint
ex: OnPaint
exception: treewin__OnPaint
ex: OnPaint
exception: treewin__OnPaint
ex: OnPaint
exception: treewin__OnPaint
ex: OnPaint
exception: treewin__OnPaint
ex: OnPaint
exception: size_t treewin__OnMouseMoveXX(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, TreeWin * t, int mx, int my)
ex: t-&amp;gt;mousemove(hWnd,mx,my);exception: treewin__OnMouseMove
ex: OnMouseMove
exception: size_t treewin__OnMouseMoveXX(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, TreeWin * t, int mx, int my)
ex: t-&amp;gt;mousemove(hWnd,mx,my);exception: treewin__OnMouseMove
ex: OnMouseMove
exception: size_t treewin__OnMouseMoveXX(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, TreeWin * t, int mx, int my)
ex: t-&amp;gt;mousemove(hWnd,mx,my);exception: treewin__OnMouseMove
ex: OnMouseMove
exception: size_t treewin__OnMouseMoveXX(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, TreeWin * t, int mx, int my)
ex: t-&amp;gt;mousemove(hWnd,mx,my);exception: treewin__OnMouseMove
ex: OnMouseMove
exception: size_t treewin__OnMouseMoveXX(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, TreeWin * t, int mx, int my)
ex: t-&amp;gt;mousemove(hWnd,mx,my);exception: treewin__OnMouseMove
ex: OnMouseMove
exception: size_t treewin__OnMouseMoveXX(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, TreeWin * t, int mx, int my)
ex: t-&amp;gt;mousemove(hWnd,mx,my);exception: treewin__OnMouseMove
ex: OnMouseMove
exception: size_t treewin__OnMouseMoveXX(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, TreeWin * t, int mx, int my)
ex: t-&amp;gt;mousemove(hWnd,mx,my);exception: treewin__OnMouseMove
ex: OnMouseMove
exception: size_t treewin__OnMouseMoveXX(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, TreeWin * t, int mx, int my)
ex: t-&amp;gt;mousemove(hWnd,mx,my);exception: treewin__OnMouseMove
ex: OnMouseMove
exception: size_t treewin__OnMouseMoveXX(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, TreeWin * t, int mx, int my)
ex: t-&amp;gt;mousemove(hWnd,mx,my);exception: treewin__OnMouseMove
ex: OnMouseMove
exception: size_t treewin__OnMouseMoveXX(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, TreeWin * t, int mx, int my)
ex: t-&amp;gt;mousemove(hWnd,mx,my);exception: treewin__OnMouseMove
ex: OnMouseMove
exception: size_t treewin__OnMouseMoveXX(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, TreeWin * t, int mx, int my)
ex: t-&amp;gt;mousemove(hWnd,mx,my);exception: treewin__OnMouseMove
ex: OnMouseMove
exception: size_t treewin__OnMouseMoveXX(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, TreeWin * t, int mx, int my)
ex: t-&amp;gt;mousemove(hWnd,mx,my);exception: treewin__OnMouseMove
ex: OnMouseMove
exception: size_t treewin__OnMouseMoveXX(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, TreeWin * t, int mx, int my)
ex: t-&amp;gt;mousemove(hWnd,mx,my);exception: treewin__OnMouseMove
ex: OnMouseMove
exception: size_t treewin__OnMouseMoveXX(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, TreeWin * t, int mx, int my)
ex: t-&amp;gt;mousemove(hWnd,mx,my);exception: treewin__OnMouseMove
ex: OnMouseMove
exception: size_t treewin__OnMouseMoveXX(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, TreeWin * t, int mx, int my)
ex: t-&amp;gt;mousemove(hWnd,mx,my);exception: treewin__OnMouseMove
ex: OnMouseMove
exception: treewin__OnLeftDoubleClick
ex: OnLeftDoubleClick
exception: treewin__OnLeftDoubleClick
ex: OnLeftDoubleClick
exception: Exception caught in TreeNode::callMemberFunction() c++/dll execution. Throwing... VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties/TableView&amp;gt;eventfunctions/setFocus c: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties/TableView thisClass: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties/TableView
exception: Exception caught in flexscript execution of VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties&amp;gt;eventfunctions/onSelObjChange line 7 instruction 22. Discontinuing execution.
exception: Exception caught in TreeNode::callMemberFunction() flexscript execution VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties&amp;gt;eventfunctions/onSelObjChange c: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties theclass: VIEW:/active/MainPanel/BackPanel/SplitterXPane/SplitterYPane~2/ToolTabPane/TabControl/QuickProperties/ToolPanel/TokenProperties/Token Properties
exception: treewin__OnPaint
ex: OnPaint&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Feb 2017 13:16:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484637#M3458</guid>
      <dc:creator>michal_klodawski</dc:creator>
      <dc:date>2017-02-07T13:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Assign string array to token label</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484638#M3459</link>
      <description>&lt;P&gt;This error is unrelated to your array.  If you save and quit and reopen the file, this error message should stop firing.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 14:32:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484638#M3459</guid>
      <dc:creator>sam_stubbsYXX86</dc:creator>
      <dc:date>2017-02-07T14:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Assign string array to token label</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484639#M3460</link>
      <description>&lt;P&gt;It didn't help &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; On string still doesn't work, I will try to do this on int because with integers it works. &lt;/P&gt;
&lt;P&gt;Thanks for reply&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 14:59:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484639#M3460</guid>
      <dc:creator>michal_klodawski</dc:creator>
      <dc:date>2017-02-07T14:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Assign string array to token label</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484640#M3461</link>
      <description>&lt;P&gt;If you can, I'd assign the string values of the array using an Assign Labels activity, rather than just initiating it via code.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 16:36:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484640#M3461</guid>
      <dc:creator>sam_stubbsYXX86</dc:creator>
      <dc:date>2017-02-07T16:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Assign string array to token label</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484641#M3462</link>
      <description>&lt;P&gt;I'm still trying with integers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Besides I don't know how to pull array from code to Assign Labels activity&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 16:45:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484641#M3462</guid>
      <dc:creator>michal_klodawski</dc:creator>
      <dc:date>2017-02-07T16:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Assign string array to token label</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484642#M3463</link>
      <description>&lt;P&gt;My guess is that you're not filling every element of the string array with data. If I designate a token as so() and execute the following code in a script window it works just fine:&lt;/P&gt;&lt;PRE&gt;stringarray TabID= makearray(10);

TabID[1] = "A";
TabID[2] = "B";
TabID[3] = "C";
TabID[4] = "D";
TabID[5] = "E";
TabID[6] = "F";
TabID[7] = "G";
TabID[8] = "H";
TabID[9] = "I";
TabID[10] = "J";

setlabel(so(),"CoUzupelnic",TabID);
&lt;/PRE&gt;&lt;P&gt;If however, one of those lines were to be removed, the value would not be visible in the quick properties. This appears to be a bug in 2016 Update 2 where it won't display if the values are not valid. &lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 00:16:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484642#M3463</guid>
      <dc:creator>matt_long</dc:creator>
      <dc:date>2017-02-08T00:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Assign string array to token label</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484643#M3464</link>
      <description>&lt;P&gt;thanks, that's true, it was such situation that not always all elements of array had string data. thank you for reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Michał&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 00:35:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484643#M3464</guid>
      <dc:creator>michal_klodawski</dc:creator>
      <dc:date>2017-02-08T00:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: Assign string array to token label</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484644#M3465</link>
      <description>&lt;P&gt;The error is pointing to part of the code that is executed when the Quick Properties window tries to display a table view, which I believe is the Labels section in this case.  I think it is a bug with how the Quick Properties window tries to display a string array in that Labels section when one or more of the array's slots in the string array are not initialized.  I can't tell you for sure unless you include the code you used to fill the array for TabID or include the model so we can open it and take a look.&lt;/P&gt;&lt;P&gt;However, I was able to use your code and fill in all 10 values of the TabID array with a random strings and the Quick Properties window displays all strings in the token's CoUzupelnic label.  But if I only fill in the first 9 values and don't put anything in the 10 slot, Quick Properties will not display the Labels field of the token correctly and I sometimes get the same error you have posted in the comments.&lt;/P&gt;&lt;P&gt;I also tested this in FlexSim 2017 and did not get the same error.  Instead, the array slots that I did not fill in would show up as NULL in the Quick Properties window, which I believe is what is supposed to happen.&lt;/P&gt;&lt;P&gt;It's also possible that the Quick Properties window doesn't know how to display a symbol in one or more of the strings if there are any unusual characters in your strings.  Again, I can't be sure until I was able to look at the code you are using to fill the arrays.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 00:46:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484644#M3465</guid>
      <dc:creator>logan_gold</dc:creator>
      <dc:date>2017-02-08T00:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Assign string array to token label</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484645#M3466</link>
      <description>&lt;P&gt;thank you for reply, indeed the problem was in array with some null values,&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 15:55:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/assign-string-array-to-token-label/m-p/13484645#M3466</guid>
      <dc:creator>michal_klodawski</dc:creator>
      <dc:date>2017-02-08T15:55:33Z</dc:date>
    </item>
  </channel>
</rss>

