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 05-19-2010
Congshi Wang Congshi Wang is offline
Student
 
Join Date: May 2010
Location: Germany
Posts: 58
Downloads: 2
Uploads: 0
Thanks: 48
Thanked 0 Times in 0 Posts
Rep Power: 124
Congshi Wang is on a distinguished road
Default How to set table values by using GUI

I want to create a custom GUI which sets the values of global table variables by typing the desired value into a edit-box. I've tried to realize this by setting a coldlink from an edit-box to the global table, but it don't work (yet). Does anyone know a solution?
  #2  
Old 05-19-2010
Congshi Wang Congshi Wang is offline
Student
 
Join Date: May 2010
Location: Germany
Posts: 58
Downloads: 2
Uploads: 0
Thanks: 48
Thanked 0 Times in 0 Posts
Rep Power: 124
Congshi Wang is on a distinguished road
Default Controls Attributes GUI builder tool Documentation

Is there a documentation of all the Controls Attributes in the GUI builder tool?
  #3  
Old 05-19-2010
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 520
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

It is important, that you point to the right node.
If you want to point to Row 1 Col 1 that’s the path you put into your coldlink:
MAIN:/project/model/Tools/GlobalTables/GlobalTable01>variables/data/1/1

To point to Row 2 Col 1 it will be
MAIN:/project/model/Tools/GlobalTables/GlobalTable01>variables/data/2/1

Be aware that the coldlink only updates, if you press Apply or Ok in your GUI. A hotlink will update immediately.

There is an overview about the Attributes in the manual under Miscellaneous Concepts / View Attributes Reference.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
The Following 3 Users Say Thank You to Tom David For This Useful Post:
Pablo Concha (05-19-2010)
  #4  
Old 05-19-2010
Congshi Wang Congshi Wang is offline
Student
 
Join Date: May 2010
Location: Germany
Posts: 58
Downloads: 2
Uploads: 0
Thanks: 48
Thanked 0 Times in 0 Posts
Rep Power: 124
Congshi Wang is on a distinguished road
Default

It works, thanks a lot!
  #5  
Old 05-19-2010
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 520
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

Congshi,

You asked how to point with an edit field to a Global Table cell and it seems to work.

Do you know that you can also put a whole Global Table into your GUI?
There is a table object in the GUI Builder which you can use.
In the viewfocus you point to the data node of your Global Table:
MAIN:/project/model/Tools/GlobalTables/GlobalTable01>variables/data
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
The Following User Says Thank You to Tom David For This Useful Post:
Gi Cha (10-20-2010)
  #6  
Old 05-19-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

in 4.52 ,you should refreshglobalvariables() in apply. if donot do that ,the value will not change.

i am sorry ,i am wrong ,if you want change globalvariable,you should refreshglobalvariables() ,if you want to change values of global table variables ,do not need refreshglobalvariables()
  #7  
Old 05-20-2010
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 520
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

I am not sure about refreshglobalvariables(), because it was working on my side without it.

refreshglobalvariables()
Description:
For developer use. Refreshes all global variables to their initial values.
Example:
refreshglobalvariables()


In my eyes refreshglobalvariables() is if you use Global Variables, but here we use data from a Global Table.
I know that you need applylinks() which is under the Apply button.

applylinks(node view [, num refresh])
Description:
For developer use. This command applies all of the hotlinks and coldlinks in the view window specified as view. If refresh is 1, then the links will be refreshed, meaning the values from the model will be retrieved and set on the window controls themselves. If refresh is 0, then the values in the model will be set according to what the user specified in the view. This command is used in Flexscript GUI programming.
Example:
applylinks(ownerview(c));
This applies all of the links in the window that is currently designated as the selected view.


Anyway, maybe Linwei had an issue here and if it is not working it is worth to try refreshglobalvariables().

Ooooh, I just realized, that Linwei correct himself. So in this sense my post is obsolete. Sorry.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."


Thread Thread Starter Forum Replies Last Post
Create a table with random values Michael Hartlieb Q&A 7 08-05-2009 08:09 AM
All time related values 0,0000001 time units delayed Patrick Cap Q&A 2 05-01-2009 01:50 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.