In my model, Eventcontroller.date(starting datetime) is before 1 month (2018/06/18 09:00:00).when simulation reach at current datetime(from system datetime 2018/07/18 17:25:00), then i want to call method. How is it possible??
Can you suggest me, How can i get datetime from system? and where can i define these code so after meet these condition(Eventcontrollere datetime= System datetime) it will call Method??
Thanks in advance for your magical idea
Solved! Go to Solution.
To get the current date time from the system have a look at the sysdate method.
You can delay the start of a method through the methCall method (for details s.helpfile).
Thanks for your reply.
We can get datetime of system from sysdate but i have one more question: I want to call Newmethod when Eventcontroller datetime= System datetime. Note that my simulation start before 1 month.
Where can i define these code ((I mean, in Display, Generator.....??))so it will activate only when eventcontroller time reach at current systemtime.
Can you suggest me a any idea?
Thanks in advance
i already read Methcall from helpfile. i wrote follwing code in Init method.
Here timediff is 9:02:34:36:9090. Means after this time methcall call this method (m_wait). But problem is system date is also running.so when simulationtime reach at systemDate(2018/07/19 11:34:36:9090) but at that point systemdate will ne different(May be 2018/07/19 11:45:00:0000 like date).
I want to call method when Both time will be excatly same. Can you suggest any better idea?
Thanks in advance
thanks @simulator for quick reply
Model description: my model is started from past ((normally before 1 month but everytime difference-- according to Excel file)). and when this simulation time reach at current time ((sysdate)) then we will gate new excel file of order. These new order, we can produce by 5 different layout.
So i want to call method (when eventcotrollerdate= sysdate)) and this method contain code that can update production plan according to new orderlist and save this model in different 5 folder.
Can you suggest any idea??
Thanks a lot
try the method of my screenshot. It calls the m_CheckSysdate until the difference between the current (real time) moment and the simulated time is smaller than a limit: in my case 1 sec.