Cancel
Showing results for 
Search instead for 
Did you mean: 

Calling method unexpectedly

Experimenter
Experimenter

Hi,

 

I have a problem with a method being called when it is not supposed to. I have created a start button to import excel files to my model and it is supposed to do only this. However, when I press the start button it calls another method, even when the simulation is not running. This method should also not be called in the initiation of the simulation but only when it is called from a shift calendar.

 

Can anyone tell me why this is happening?

 

/Elin

6 REPLIES

Re: Calling method unexpectedly

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Elin,

 

It probably means that you method is triggered somewhere anyway, but you forgot where you set it. Please go to the General tab and use Find Object to look up where the method is triggered. Fill in the method's name and look for Attribute and for Source Code.

 


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Calling method unexpectedly

Experimenter
Experimenter

Hi Gert,

Thanks for your answer.

 

However, I cannot find where the method is triggered. When I search for it in Find Object it only shows in source code that it is triggered in the shift calendars attribute. And for attribute only the method itself turns up.

 

/Elin

Re: Calling method unexpectedly

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Which attribute?


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Calling method unexpectedly

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

How is it originally triggered, as a Pause-control or Unplanned-control, or else...?


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Calling method unexpectedly

Experimenter
Experimenter

It's triggered with an unplanned control

Re: Calling method unexpectedly

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Clear, the Unplanned-control is triggered when the Unplanned-attribute changes. This can also happen when a rest occurs.

 

You can check in the method if an EventController is running:

if NOT EventController.isRunning then
return
end

Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com