question

Travis Hill avatar image
0 Likes"
Travis Hill asked Phil BoBo answered

"stats" node does not get updated in the model update processes

It seems that for all objects the "stats" node does not get updated in the model update processes. As a result of the "stats" node not being updated to utilize tracked variables (method used in 2017). The stats family of FlexScript commands do not work and error out.

Object obj = current;
double outVal = obj.stats.output.value; //fails
double outVal = obj.stats.input.value; //fails
FlexSim 18.0.1
flexscripttracked variablesstats
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

Phil BoBo avatar image
1 Like"
Phil BoBo answered

This is by design. If your object is using the old stats structure, you need to use an older API to access it. Use the getstat() command as explained in detail in the 16.0.0 release notes.

The new Object.stats API syntax (introduced in 17.1.0) only works for new stats structures: objects built after 16.0.

5 |100000

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