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 |
#1
|
|||
|
|||
Writing to global table
Hi,
I'm trying to write the output of the number of orders processed into a global table. I was able to get the order number to be written on the table but only on row 1. Added the code "addtablerow("Feedback") so it insert a row to the table every time the trigger is activated. It doesn't seem to like it, I don't see any row increment and when I manually add a row to the table, it doesn't go to the next cell in the table. model is attached ver 6.02 Thanks George |
#2
|
|||
|
|||
Your code hasn't been applied. Hit apply on the exittrigger and then on the Combiner Properties and run it again.
|
The Following User Says Thank You to Jason Lightfoot For This Useful Post: | ||
George Serhan (09-26-2012) |
#3
|
|||
|
|||
Reset is jumpy
Hi Jason,
On the reset button I have a loop that go through the number of rows and delete them except the first one. That's not what occur when I reset the model. If I have 10 rows in the "Feedback" table for instance, the reset only delete 5 rows, and if I push it again it delete 2 rows. It seems that it's dividing the total count of rows by 2 and delete them every time the reset button is pushed. I don't know why is that happening, any idea!!!!!! Thanks George |
#5
|
||||
|
||||
Code:
for(int i = 2; i <= numrows; i++) { deletetablerow("Feedback",i); } You can fix it using something like these examples: Code:
for(int i = numrows; i > 1; i--) { deletetablerow("Feedback",i); } Code:
while(gettablerows("Feedback") > 1) { deletetablerow("Feedback",2); } |
The Following User Says Thank You to Phil BoBo For This Useful Post: | ||
George Serhan (09-26-2012) |
Thread | Thread Starter | Forum | Replies | Last Post |
Dispatcher and Global table | Manoj Kumar | Q&A | 4 | 07-06-2012 07:07 AM |
Plotting Global Table | shashanktrivedi | Q&A | 2 | 06-17-2011 05:50 AM |
Tasksequence by using global table | Jelmer Js | Q&A | 7 | 04-20-2011 09:01 AM |
Global Table string value | Congshi Wang | Q&A | 1 | 05-24-2010 07:38 AM |
Can I make a column of a global table to type table? | qin tian | Q&A | 0 | 10-01-2008 09:27 PM |