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
|
|||
|
|||
Global Table on GUI
Hello Everyone,
how can i display a GlobalTable in my custom GUI, what code i have to use in 'viewfocus' ? I would appreciate any help and hint. Thanks in advance Ameen Shabeer |
#2
|
|||
|
|||
You want the data variable of the global table object.
The simplest method if the viewfocus node has string data is: nodetopath(reftable("MyGlobalTable")); or to use the names instead of ranks, nodetopath(reftable("MyGlobalTable"),1); If the viewfocus has had coupling data you'll want to set it with : nodepoint(<the viewfocus node>, reftable("MyGlobalTable")); ..but since the global tables don't typically move around that's not likely needed |
The Following User Says Thank You to Jason Lightfoot For This Useful Post: | ||
David Chan (01-30-2013) |
#4
|
|||
|
|||
I guess I missed the initial step of dragging the table control onto your main GUI canvas. It's the viewfocus of that control that you need to set.
If you're not setting the focus in code, you can just use the top two reftable examples in a script window (without the semicolon) and when you execute the script it will give you the string to enter in the viewfocus node of the table control. Last edited by Jason Lightfoot; 01-20-2013 at 09:10 AM. |
The Following User Says Thank You to Jason Lightfoot For This Useful Post: | ||
ameen shabeer (01-20-2013) |
#6
|
|||
|
|||
Hi Ameen / Jason,
My goal is to Load Global table values in GUI Table and be able to edit them. I am facing similar problem. I am not able to load global table values into GUI table. Can you send a sample model so I can understand it. Thanks |
#7
|
||||
|
||||
Global Table in Gui
Hello!
I am currently trying to form a GUI that stores values in a Global Table. Those values will be called from different objects in the model but they do not need to be reniewed during the run. I am not sure i have the right concept. I have put a table in my GUI and on button. But how do i link the GUI\'s table with my global table ? And how can i insert data in my GUI table ? A small model example would be really help full Thank you in advance for your answer p.s. i am using edition 4.52, so unfortunately i cannot have access to more recent models
__________________
Version 4.5_2 Simulate, don't speculate!!! |
#8
|
|||
|
|||
The viewfocus node of the table view structure needs to point to the data node of the global table and so will be something like:
MODEL:/Tools/GlobalTables/MyTable>variables/data If you want edit fields in a GUI (not a table view) to update individual cells in a table, then you\'d provide the path to that cell\'s node under the table\'s \'data\' node in a coldlink or hotlink. In this case the path would look something like: MODEL:/Tools/GlobalTables/MyTable>variables/data/rowname/columname or MODEL:/Tools/GlobalTables/MyTable>variables/data/4/3 Last edited by Jason Lightfoot; 04-14-2014 at 02:53 AM. |
The Following 3 Users Say Thank You to Jason Lightfoot For This Useful Post: | ||
Tom David (04-14-2014) |
Tags |
gui |
Thread | Thread Starter | Forum | Replies | Last Post |
Writing to global table | George Serhan | Q&A | 4 | 09-26-2012 12:04 PM |
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 |
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 |