question

Thomas JR avatar image
0 Likes"
Thomas JR asked Thomas JR commented

Can you enable/disable Statistical collector through custom code?

I can find the variable "enable" in the tree for my Statistical collector, but I dont know how to access it.

I tried something like

Model.find("Path to Statistical Collector").labels["enable"] = 1.0;

without success.

FlexSim 20.1.3
flexsim 20.1.3statistics collector
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

·
Raja Sekaran avatar image
0 Likes"
Raja Sekaran answered Thomas JR commented

@thomas.jr

You can use the below code to enable and disable the statistics collector. You can find this in tree node (Tools>>StatisticsCollectors>>StatisticsCollector1>>Variables)

Model.find("Tools/StatisticsCollectors/StatisticsCollector1>variables/enabled").value = 0;   

0 - Disable

1 - Enable

EnableStatisticsCollector.fsm

Thanks


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

Thomas JR avatar image Thomas JR commented ·

@raja.sekaran It works, thanks!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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