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.
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.
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:
- getvarnode(getactivity("ProcessFlow", "List"), "listRef").value = List(MY_LIST);
I am not sure about performance in this case, as List("myList") is also a dynamic reference, just not parsing a token (#define MY_LIST "MyList").
There is nothing in FlexSim's documentation advising against using macros to standardize name references.
I am looking for standardized and reusable objects that can be easily adapted, hence, having the names listed as macros, for instance. This is a pretty standard feature in other simulation environments and structured programming languages.
Thank you.8 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © 2025 Autodesk Inc. All rights reserved