ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#3
|
|||
|
|||
I see, I also think it can help and work. Could you tell me how to use it? because I have never touched coding in Flexsim, until now.
I inputed into Script Window "if(time()==54000) { resetstats(); } " and execute and run the model nothing is changed Last edited by Kelvin chan; 01-09-2013 at 03:27 AM. |
#4
|
||||
|
||||
You should never check a condition like "time()" with "==" (Background: The simulation time jumps from one event toanother event. It's just luck if your simulation time is 54000.000 just in that moment).
Please create an User Event at time 54000 (have a look in the tools menu) and in that event you add the command resetstats(). With the script window just add resetstats() without your "if" to test the command. |
The Following 2 Users Say Thank You to Carsten Seehafer For This Useful Post: | ||
RalfGruber (01-09-2013) |
#5
|
|||
|
|||
Thank you!! but, how can I add the commard in "event code"? It can create and initialize label, set label, set color, set location, write to globaltable, close and open port, send message, and change 3d shape. It don't have the opinion for adding commend.
the commend is ok when I use script window |
#6
|
||||
|
||||
Just click on the button "directly edit code for this trigger" (button looks like a paper). This opens the code editor or the logic builder (depends on your settings). If necessary you can switch between logic builder and code editor with the button in the left corner of the builder/editor (looks like a puzzle piece).
Greetings Carsten |
The Following User Says Thank You to Carsten Seehafer For This Useful Post: | ||
Kelvin chan (01-20-2013) |
#7
|
|||
|
|||
I face a very very very trouble problem /.\, when I click on the button "directly edit code for this trigger", flexsim will break down. and then, if I click on anything in flexsim, it don't have any reaction. What can I do?
My model is attached in here. Could you have a look on it? please my model |
Thread | Thread Starter | Forum | Replies | Last Post |
How do you determine warm-up time in Flexsim? | zhang xin | Q&A | 0 | 05-23-2012 11:00 PM |
"Fake" warm-up (initial conditions) | Stefan Trabut | Q&A | 1 | 07-20-2011 03:32 AM |
Collect data from steady state period (Recorder, VisualTool | Thirapan Kangwansura | Q&A | 1 | 05-19-2010 06:18 AM |