question

Gui Vaccaro avatar image
0 Likes"
Gui Vaccaro asked Gui Vaccaro commented

List activity not showing tokens when macro is used

Hello,

please see the example below. It shows the same list being referred by a macro name and by a string. The tokens do not appear in the first case as they do in the second.

Fixing this would be appreciated.

Example_List_with_Macro_Name.fsm

FlexSim 25.0.2
listprocesss flowactivitymacro
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

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Gui Vaccaro commented

This isn't an issue with macros - the issue is that it's a dynamic reference. The list on the right isn't using a string, it's using a direct pointer to the list in the toolbox. If you make the the list on the right use a string it does the same thing:

example-list-with-string-name.fsm

This behavior is by design. The List's draw code only handles direct pointer references. It doesn't evaluate dynamic references in the draw code since that would cause performance issues.

I'm not sure what you're trying to do with list names in macros, but depending on what you're doing you could use the macro to set the list reference as a direct pointer:

  1. getvarnode(getactivity("ProcessFlow", "List"), "listRef").value = List(MY_LIST);

· 1
5 |100000

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