<?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 Process flow does not recognize labels created with assign label when using string in global macros in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550793#M55516</link>
    <description>&lt;P&gt;&lt;I&gt;[ FlexSim 16.2.2 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have noticed that if you want to access a label defined in process flow in an "Assign labels" activity one has to define the label name as a string in the menu. I tried to assign the name using a string defined in the global macros, but in this case process flow does not recognize the created label and it is not visible in the labels menu in other activities.&lt;/P&gt;&lt;P&gt;Is this a bug? &lt;/P&gt;&lt;P&gt;See the attached screenshot and model for what is going on. I can circumvent the problem by adding a dummy Assign labels activity where I 
enter the string manually, but the purpose of using macros is that I 
would not need to change the code manually if I change the name defined 
by the macro.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Axel&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3913-86pmi.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1494579i3EA14F4C7D79F4D6/image-size/large?v=v2&amp;amp;px=999" role="button" title="3913-86pmi.png" alt="3913-86pmi.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Nov 2016 12:36:31 GMT</pubDate>
    <dc:creator>axel_kohonen</dc:creator>
    <dc:date>2016-11-24T12:36:31Z</dc:date>
    <item>
      <title>Process flow does not recognize labels created with assign label when using string in global macros</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550793#M55516</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 16.2.2 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have noticed that if you want to access a label defined in process flow in an "Assign labels" activity one has to define the label name as a string in the menu. I tried to assign the name using a string defined in the global macros, but in this case process flow does not recognize the created label and it is not visible in the labels menu in other activities.&lt;/P&gt;&lt;P&gt;Is this a bug? &lt;/P&gt;&lt;P&gt;See the attached screenshot and model for what is going on. I can circumvent the problem by adding a dummy Assign labels activity where I 
enter the string manually, but the purpose of using macros is that I 
would not need to change the code manually if I change the name defined 
by the macro.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Axel&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3913-86pmi.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1494579i3EA14F4C7D79F4D6/image-size/large?v=v2&amp;amp;px=999" role="button" title="3913-86pmi.png" alt="3913-86pmi.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 12:36:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550793#M55516</guid>
      <dc:creator>axel_kohonen</dc:creator>
      <dc:date>2016-11-24T12:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Process flow does not recognize labels created with assign label when using string in global macros</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550794#M55517</link>
      <description>&lt;P&gt;The Label's name seems to be set properly:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3950-testlabel.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1494577iDFD2364DFADB8633/image-size/large?v=v2&amp;amp;px=999" role="button" title="3950-testlabel.png" alt="3950-testlabel.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What your picture is showing is the dropdown menu for the Delay activity.  You're trying to select a token label from a list of initial token labels.  But since you're setting that token label's name dynamically, it's not going to be on list of available token labels to select.  &lt;/P&gt;&lt;P&gt;If you're wanting to reference the token label dynamically you could set the delay field to read:&lt;/P&gt;&lt;P&gt;getlabel(token,L_TEST_LABEL)&lt;/P&gt;&lt;P&gt;or just&lt;/P&gt;&lt;P&gt;getlabel(token,"Test") &lt;/P&gt;&lt;P&gt;both would work in this case.&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.flexsim.com/storage/attachments/3951-testlabel.fsm"&gt;testlabel.fsm&lt;/A&gt;
&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 16:19:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550794#M55517</guid>
      <dc:creator>sam_stubbsYXX86</dc:creator>
      <dc:date>2016-11-28T16:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Process flow does not recognize labels created with assign label when using string in global macros</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550795#M55518</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/614/sam.s.html" nodeid="614"&gt;@Sam Stubbs&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Thank you! Ok, so it is not possible to use dynamic label names in process flow. Would that be something that you could consider adding? Maybe only to the assign labels activity (maybe in the pick list?) which would be simpler than adding it to any custom code (which probably is very hard).&lt;/P&gt;&lt;P&gt;I can generally use your solution with getlabel to get the correct labels. However, when I want to set the token color or shape (in process flow visualization) then the token labels have to be found in the pick list of available token labels so that I can use them for choosing the color or shape of the token. So there I have circumvented the problem by adding a dummy assign labels activity. Here I cannot use a dynamically named label though, but that is generally not a big issue.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Axel&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 06:43:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550795#M55518</guid>
      <dc:creator>axel_kohonen</dc:creator>
      <dc:date>2016-11-29T06:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Process flow does not recognize labels created with assign label when using string in global macros</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550796#M55519</link>
      <description>&lt;P&gt;if your structure of labels does not differ, you could access the different labels just by their rank instead of their name.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 07:20:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550796#M55519</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2016-11-29T07:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Process flow does not recognize labels created with assign label when using string in global macros</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550797#M55520</link>
      <description>&lt;P&gt;I think you misunderstood what I was saying.   You CAN use dynamic labels in Process Flow.   It's just that the list of dropdown predefined labels won't be populated, because a dynamic label (by definition) is not predefined.   If a label is set during a model's run (as in your example) FlexSim won't know ahead of time what label to populate the predefined list with.  Does that make sense?&lt;/P&gt;&lt;P&gt;But in your code if you were to write Label: Test on the Delay's duration, it would still work.  Or you could use getlabel(token, MACRO_NAME) as well. etc etc.   You absolutely can use dynamic labels.   You just won't see their names in the predefined list of label names, because as I said, they haven't been predefined yet..&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 14:21:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550797#M55520</guid>
      <dc:creator>sam_stubbsYXX86</dc:creator>
      <dc:date>2016-11-29T14:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Process flow does not recognize labels created with assign label when using string in global macros</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550798#M55521</link>
      <description>&lt;P&gt;Accessing labels by rank on 3D objects is fine, but you cannot access labels by rank on Tokens.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 14:27:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550798#M55521</guid>
      <dc:creator>matt_long</dc:creator>
      <dc:date>2016-11-29T14:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Process flow does not recognize labels created with assign label when using string in global macros</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550799#M55522</link>
      <description>&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;Thank you for letting me know about that.&lt;/P&gt;&lt;P&gt;Axel&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 05:21:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550799#M55522</guid>
      <dc:creator>axel_kohonen</dc:creator>
      <dc:date>2016-11-30T05:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Process flow does not recognize labels created with assign label when using string in global macros</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550800#M55523</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/614/sam.s.html" nodeid="614"&gt;@Sam Stubbs&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Sorry if I was unclear. I do understand that you can use the dynamic labels (as I am using them currently), but if you want the list to be populated you cannot use dynamic labels. This also means that if you want a label that you use for the visualization to set the color or shape of the token (see image&lt;A href="https://answers.flexsim.com/storage/temp/4004-processflowlabels.jpg"&gt; processflowlabels.jpg&lt;/A&gt;) then you have to use a label defined non-dynamically as only pre-defined labels will be available here. &lt;/P&gt;&lt;P&gt;So from FlexSim's point of view the macros are dynamic?&lt;/P&gt;&lt;P&gt;Also, would it be possible or desirable to add a pick list option to the visualization label references so that one could select the label dynamically also here? Then I could use the dynamic labels everywhere.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Axel&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 05:29:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550800#M55523</guid>
      <dc:creator>axel_kohonen</dc:creator>
      <dc:date>2016-11-30T05:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Process flow does not recognize labels created with assign label when using string in global macros</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550801#M55524</link>
      <description>&lt;P&gt;They are dynamic in the sense that they aren't evaluated until run time and they are only evaluated by the compiler, not by any of the GUIs.&lt;/P&gt;&lt;P&gt; 
If you wanted to be able to use a Macro to define the token color and shape, then you'd be defining it by code (which is actually possible to do when defining text displayed on tokens). This of course is slow if you're having to evaluate the code for each token on every draw.We could add some kind of weird mechanism that would evaluate the code once on reset and then store the evaluated string.But this would really only help in the case of using macros. &lt;/P&gt;&lt;P&gt;I would think that using macros for label names is a lot less common then just typing a name. Especially with the new dot syntax, your code changes from :&lt;/P&gt;&lt;PRE&gt;token.labelName&lt;/PRE&gt;&lt;P&gt;to&lt;/P&gt;&lt;PRE&gt;token.labels[LABEL_NAME_MACRO].value&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Nov 2016 19:54:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/process-flow-does-not-recognize-labels-created-with-assign-label/m-p/13550801#M55524</guid>
      <dc:creator>matt_long</dc:creator>
      <dc:date>2016-11-30T19:54:17Z</dc:date>
    </item>
  </channel>
</rss>

