How to update Process Flow Variables on FlexScript

How to update Process Flow Variables on FlexScript

takamatsu_keita
Observer Observer
17 Views
2 Replies
Message 1 of 3

How to update Process Flow Variables on FlexScript

takamatsu_keita
Observer
Observer

[ FlexSim 24.2.1 ]

Our customer wants to know how to update value of process flow variables on FlexScript. I understood that the value of process flow variables can be obtained with `getprocessflowvar` command, but I could not find how to update them. Could you give me some ideas on how to update value of process flow variables?

0 Likes
Accepted solutions (1)
18 Views
2 Replies
Replies (2)
Message 2 of 3

logan_gold
Community Manager
Community Manager
Accepted solution

Hey @Keita T., I think Process Flow Variables are supposed to be updated through the interface, like it indicates in the documentation. And I think it's built this way because Process Flow Variables are meant to be changed once before a model is run and the values are used through the run, instead of changing on the fly with FlexScript.

That being said, since there is a user interface to change a Process Flow Variable, there's probably a way to mimic the code that is used in the interface, although I haven't found how with a preliminary look at the tree.

It might be easier for your customer to link a Process Flow Variable to something like a Global Table, and then change the values in the Global Table with FlexScript.

Or if they just need to change something dynamically while the model is running, they could use Process Flow labels (or maybe labels on objects if using Object/Instance Process Flows).

Message 3 of 3

takamatsu_keita
Observer
Observer

@Logan Gold Thank you for your reply. I understood that Process Flow Variables cannot be changed the values with FlexScript. I will suggest our customer the method with Global Tables as suggested.

0 Likes