LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

changing property nodes from a different vi

Solved!
Go to solution

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

0 Kudos
Message 1 of 12
(5,232 Views)
Solution
Accepted by Elqui

Create a control reference from the main VI and pass it into the subVI and into the reference input on a property node. 

untitled.PNG

--
Tim Elsey
Certified LabVIEW Architect
Message 2 of 12
(5,227 Views)

Spectacular. Thanks.

 

 

0 Kudos
Message 3 of 12
(5,211 Views)

[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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 12
(5,192 Views)

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

0 Kudos
Message 5 of 12
(4,911 Views)

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"

0 Kudos
Message 6 of 12
(4,896 Views)

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

0 Kudos
Message 7 of 12
(4,887 Views)

Hi pradeep,

First of all you should have started new thread.

Now for your question. Try with following vi.

Let me know.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 8 of 12
(4,879 Views)

Guarav K. Do you think there is a way to implement the same idea as yours for setting the browse start path property of a path control located in a subvi using code written strictly in the man vi? 

[BADGE NAME]

0 Kudos
Message 9 of 12
(4,108 Views)

Try this

snip.png

 

 

mcduff

0 Kudos
Message 10 of 12
(4,104 Views)