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 Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 01-18-2013
ameen shabeer ameen shabeer is offline
Contributing
 
Join Date: Jun 2012
Posts: 28
Downloads: 30
Uploads: 0
Thanks: 15
Thanked 1 Time in 1 Post
Rep Power: 0
ameen shabeer is on a distinguished road
Default 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  
Old 01-19-2013
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Smile

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)
  #3  
Old 01-19-2013
ameen shabeer ameen shabeer is offline
Contributing
 
Join Date: Jun 2012
Posts: 28
Downloads: 30
Uploads: 0
Thanks: 15
Thanked 1 Time in 1 Post
Rep Power: 0
ameen shabeer is on a distinguished road
Default

Dear Jason,
thanks for your replay,

i am not understanding your solution, can you post a simple model ?

Regards
Ameen
  #4  
Old 01-20-2013
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

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)
  #5  
Old 01-20-2013
ameen shabeer ameen shabeer is offline
Contributing
 
Join Date: Jun 2012
Posts: 28
Downloads: 30
Uploads: 0
Thanks: 15
Thanked 1 Time in 1 Post
Rep Power: 0
ameen shabeer is on a distinguished road
Thumbs up

Success !!!

Thanks Jason

Regards
Ameen
The Following User Says Thank You to ameen shabeer For This Useful Post:
David Chan (01-30-2013)
  #6  
Old 04-23-2013
Abdul Mirza Abdul Mirza is offline
Flexsim User
 
Join Date: Jul 2012
Posts: 13
Downloads: 0
Uploads: 0
Thanks: 5
Thanked 1 Time in 1 Post
Rep Power: 94
Abdul Mirza is on a distinguished road
Default

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  
Old 04-13-2014
Eleni Liosi's Avatar
Eleni Liosi Eleni Liosi is offline
Flexsim User
 
Join Date: Dec 2013
Posts: 11
Downloads: 0
Uploads: 0
Thanks: 17
Thanked 0 Times in 0 Posts
Rep Power: 77
Eleni Liosi is on a distinguished road
Default 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  
Old 04-14-2014
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

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


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.