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 Shift Schedule Table
I'm trying to write to the Shift Time Table via a command.
In FlexSim Code:
treenode Table = node("MODEL:/Tools/TimeTables/Schedule_1>variables/table",model()); pd(gettablenum(Table,1,1)); settablenum(Table,1,1,1); but in HC it doesn't |
#2
|
||||
|
||||
FlexSim GP added the MODEL path descriptive in a recent update which HC hasn't adopted yet. In either case, you are over-defining the path by typing model() for the second parameter of the node() command. For some reason it still works, but probably shouldn't. The node() command only needs the second parameter if the first parameters specifies a path that doesn't start with the root descriptives of MAIN, VIEW. The MODEL descriptive replaces "MAIN:/project/model".
Here are four different ways to get a reference to the shift schedule table in HC: Code:
treenode Table = node("MAIN:/project/model/Tools/TimeTables/Schedule_1>variables/table"); treenode Table = node("/Tools/TimeTables/Schedule_1>variables/table", model()); treenode Table = node(">variables/table", Schedule_1); treenode Table = getvarnode(Schedule_1, "table"); |
The Following User Says Thank You to Cliff King For This Useful Post: | ||
mefhsmflexsimbr (04-23-2015) |
Thread | Thread Starter | Forum | Replies | Last Post |
Shift schedule import from excel | Pongjetanapong | FlexSim HC: Q&A | 2 | 09-25-2013 04:59 PM |
Writing to global table | George Serhan | Q&A | 4 | 09-26-2012 12:04 PM |
Shift work | m matias | Q&A | 2 | 02-21-2010 01:12 PM |
Writing Triggers | Xavier Jackson | Q&A | 1 | 07-18-2008 10:36 AM |
Writing to a CSV | Gavin Douglas | Q&A | 2 | 07-18-2008 10:19 AM |