Hi
I want to get the processing and setup time of an Processor. I have tried to use Object.stats.state to do that but something goes wrong. I get an error (below). What's wrong?
Error:
time: 0.000000 exception: FlexScript exception: Could not access state variable on object Vaihe2 (profile: 2) at MODEL:/Tools/UserEvents/UserEvent1>variables/eventexception: FlexScript exception: Could not access state variable on object Vaihe2 (profile: 2) at MODEL:/Tools/UserEvents/UserEvent1>variables/event
My code:
forobjecttreeunder(model()){
if(getnodename(classobject(a)) == "Processor") {
Object processor = a.as(Object);
double processing_time = processor.stats.state(2).value;
double setup_time = processor.stats.state(21).value;
}
}