question

Stan Davis avatar image
0 Likes"
Stan Davis asked Ryan Clark commented

Get Variable Shared Asset Value in Code

For a Process Flow Variable, I can get its value using getprocessflowvar(processFlow, "pfVar")

But I'm struggling with getting a Variable shared asset's current value using flexscript.

Some of what I've tried...

getvarnum(processFlow, "MyVar")

Model.find("MyVar").value

getstat(getactivity(processFlow, "MyVar"), "Content", STAT_CURRENT)


Any help would be appreciated. Thanks

FlexSim 21.1.5
processflowflexscriptvariableflexsim 21.1.5
· 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.

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Stan Davis commented
  1. Variant value = processFlow.find("MyVar>variables/variableRef").evaluate();

I don't know if this is the "proper" way to access it (probably not), but it should work.

· 5
5 |100000

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