question

Keita T. avatar image
0 Likes"
Keita T. asked Keita T. commented

How to update Process Flow Variables on FlexScript

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?

FlexSim 24.2.1
process flow variable
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

Logan Gold avatar image
1 Like"
Logan Gold answered Keita T. commented

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).

· 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.

Keita T. avatar image Keita T. commented ·

@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 0 ·