11-16-2009 12:19 PM
So, I am trying to monkey proof a GUI, I need to disable/turn visible off, some controls depending on the user selection and change it back to visible/enabled with others. Unfortunately, there are a lot of controls so my main prgroam is getting too big and hard to debug, so I decided to create some sub VIs to control each case and simplify the program. I read the help and apparently is possible to do this but for the life of me I don't see how. I am using the "Node Property" --> "Link to" selection to bind the control, but it only shows controls in the same VI panel, even if there are other VIs in the same project.
Can anyone help me or is this just not possible.
Thanks in advance
Solved! Go to Solution.
11-16-2009 12:31 PM
Create a control reference from the main VI and pass it into the subVI and into the reference input on a property node.
11-16-2009 01:02 PM
Spectacular. Thanks.
11-16-2009 01:48 PM
[Set Proud G-Daddy Mode = True]
One of my rookies wrote some re-use code that leverages off of an XControl to allow access to a control ref of any VI in an app from anywhere. As you can tell by me posting this message, I was pleased with his final solution. (Yikes, I have created a monster!) No I can't post his code but in-case anyone was wondering if it could be done.... the answer is Yes!
[Set Proud G-Daddy Mode = False]
Ben
01-20-2011 01:14 AM
How do I use control, when I'm calling a SubVI dynamically? Since I'm using Run-Time Menu here, I had no other option to program..
Thanks,
Pradeep
01-20-2011 02:15 AM
Hi Pradeep,
Use "Control Value Set" method to set/get value from controls/Indicators
Pls see the attached image that setting value to the boolean control named "Bool1"
01-20-2011 02:36 AM
Hi G K,
Thanks again,
My problem here is not to set the value of the boolean control, but to enable it inside the SubVI, whenever I'm closing panel. I've used panel close event here.
As you can see in my screenshot, I'm disabling the Trend button. I want this to be enabled once I close the called SubVI.
Ill attach my complete code for your reference.
Thanks,
Pradeep
01-20-2011 03:20 AM
Hi pradeep,
First of all you should have started new thread.
Now for your question. Try with following vi.
Let me know.
03-23-2018 03:54 PM
03-23-2018 04:00 PM
Try this
mcduff