LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create local variable from nested custom control?

Solved!
Go to solution

I inherited some code that has a CTL control cluster nested inside another CTL control cluster.  If I drag the nested control outside the border of the other, I am able to right-click to create a local variable, which I need to connect to Bundle by Name.  However, as soon as I drag it back inside the boundaries of the outer control, it breaks the local variable.

 

How can I create a local variable from a cluster CTL nested inside a second cluster CTL?

 

Is there some kind of OuterCluster.InnerCluster reference I can use if I make a local variable from the outer cluster?

0 Kudos
Message 1 of 4
(3,290 Views)
Solution
Accepted by topic author wildcatherder

It turns out that I don't need a local variable for the inner cluster.

 

The attached JPG shows that I created a local variable for the outer cluster (ParametersCluster), used an Unbundle by Name function to access the inner cluster (EmptyParmeters) and can access any of the elements via another Unbundle by Name.

 

 

Message 2 of 4
(3,282 Views)

If you make a local to the outer cluster, then unbundle it, you get your inner cluster.

 

(I'm ignoring the fact that you really don't want to use locals unless you have to, and assume you know what you are doing normally)

0 Kudos
Message 3 of 4
(3,279 Views)

You cannot have local variables for individual items in a cluster, however nothing prevents you from creating a value property node. That will work just fine.

0 Kudos
Message 4 of 4
(3,272 Views)