PDA

View Full Version : Table Commands Library


Brandon Peterson
07-29-2008, 12:47 PM
All,

Here is a userlibrary that will automatically load the commands listed below. All of the commands are commented as usual and all of the commands have error checking that will display the error message in the output console. Each of the commands is also capable of accepting a treenode, number, or string for the table value.

Commands:
addtablerow
deletetablerow
movetablerow
swaptablerows
resetrowtitles
addtablecol
deletetablecol
movetablecol
swaptablecol
resetcoltitles

Let me know what you think,
Brandon

AlanZhang
07-29-2008, 01:00 PM
This is a nice library which provided many handy commands for table operations. Why not put them into the Flexsim next release version?

Dirk-Jan
08-13-2008, 04:23 AM
I agree with Alan. Would be a nice addition to the commands.

regards,
DJ

Tom David
08-13-2008, 04:27 AM
Yes, I agree also and like to thank Brandon for the good job ...

Steven Hamoen
09-25-2008, 09:42 AM
Brandon,

Nice library!

But now I have to spoil the party a bit. I used the deletetablerow command and you forgot to update the row variable. So after I delete a row of say a table of 5 rows, and I used gettablerows I still get 5 instead of the expected 4.

The same for the deletetablecol.

When I looked at the code I also found that for the deletetablerows, you check for max nr of cols instead of rows. So better fix that too before they are added to standard flexsim:D

Steven

Brandon Peterson
09-25-2008, 10:25 AM
Steven,

Thanks for finding the problems with the commands. I updated the two commands that had problems and have updated the library here and in the first post.

Brandon