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 03-10-2008
Martin Kooijman Martin Kooijman is offline
Flexsim User
 
Join Date: Sep 2007
Posts: 10
Downloads: 13
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 154
Martin Kooijman is on a distinguished road
Default GUI & Checkbox

I want to use a checkbox in my GUI, but it won't save it state. When I check the box, it is unchecked when I reopen the GUI. Do I have to use a coldlink or something?

Martin
  #2  
Old 03-10-2008
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default Yes

Yes, using a coldlink works well. Here's an example of a checkbox in a GUI that's coldlinked to a Global Table value.
Attached Files
File Type: zip checkbox_coldlink.zip (8.4 KB, 361 views)
  #3  
Old 03-11-2008
Martin Kooijman Martin Kooijman is offline
Flexsim User
 
Join Date: Sep 2007
Posts: 10
Downloads: 13
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 154
Martin Kooijman is on a distinguished road
Default Thanks

Phil, thanks for your reply. I thought I could use the command "getchecked" in an if statement with out saving the state in a global table. But it works with a coldlink as you showed me with your small model.
  #4  
Old 03-11-2008
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

You can use getchecked() and setchecked() in an if() statement if that's what you want to do.

You can also coldlink it to whatever node you want. I was just using a Global Table value for an example. The Parameters page of a queue shows a good example of a coldlinked variable on the Lifo checkbox.

You can look at examples of GUI development by right clicking on most windows and going to View > Explore Structure.

The path "@>objectfocus+>variables/lifo" is slightly complicated. The '@' symbol goes to the ownerview(). '>' dives into object data. '+' executes a string variable as a path and returns the node that it points to. (In this example, the ownerview's objectfocus is a path pointing to a certain queue.)

Hopefully this helps for whatever it is you are trying to do.

Last edited by Phil BoBo; 11-19-2014 at 06:30 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.