ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Healthcare (HC) > FlexSim HC: Q&A
Downloads

FlexSim HC: Q&A Questions about FlexSim Healthcare

  #1  
Old 03-15-2015
michaelsmith michaelsmith is offline
TMN Simulation -Australia
 
Join Date: Aug 2007
Location: Hobart Tasmania
Posts: 62
Downloads: 7
Uploads: 0
Thanks: 31
Thanked 19 Times in 12 Posts
Rep Power: 170
michaelsmith will become famous soon enough
Default 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);
Works to set the table value (Print command for extra debug)
but in HC it doesn't
  #2  
Old 04-23-2015
Cliff King's Avatar
Cliff King Cliff King is offline
Vice President Technical Services
 
Join Date: Jul 2007
Location: Utah
Posts: 272
Downloads: 158
Uploads: 14
Thanks: 102
Thanked 304 Times in 110 Posts
Rep Power: 412
Cliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud of
Default

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");
Note: the last two options only work in HC because HC automatically creates global pointers to objects using the name of the object.
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


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.