question

Axel Kohonen avatar image
0 Likes"
Axel Kohonen asked Matt Long commented

Process flow does not recognize labels created with assign label when using string in global macros

Hi,

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.

Is this a bug?

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.

Thank you!

Kind regards,

Axel

FlexSim 16.2.2
process flowbuglabel assignment
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Sam Stubbs avatar image
2 Likes"
Sam Stubbs answered Matt Long commented

The Label's name seems to be set properly:

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.

If you're wanting to reference the token label dynamically you could set the delay field to read:

getlabel(token,L_TEST_LABEL)

or just

getlabel(token,"Test")

both would work in this case.

testlabel.fsm


testlabel.png (9.4 KiB)
testlabel.fsm (14.6 KiB)
· 7
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.