LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a reference in the block diagram during execution?

Solved!
Go to solution

Hello,

 

I'm doing a program and I would like to create references to objects in execution time, is there a function in labview that allows you to do this?

 

Thanks in advance!

0 Kudos
Message 1 of 4
(1,055 Views)

What do you mean by "create references to objects in execution time" ?
You can't create controls/indicators at runtime, so the references are there at edit time also.

You can get the references for all controls on the front panel by using the "property node" and selecting the class Pane under the right-click menu VI server -> Generic -> GObject -> Pane. Then select the property Controls[].

 

Or are you talking about OOP objects ? 

0 Kudos
Message 2 of 4
(1,053 Views)

What I want to do is create a generic subvi where I can send a cluster of objects (which number can change). I want the subvi to change a property of those objects (for example, the visibility). If I unbundle the cluster I get objects, not references, and I was wondering if it's possible to obtain a reference from those objects to input to a property node.

 

Surely there is a better way to do this, but I'm new in Labview and I haven't found it...

 

Thanks

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

Maybe it is just me but what do you mean by "cluster of objects" ? 

Is it a cluster as terminal ? If it is, then just to let you know, a cluster can't change size/number at runtime, you need an array for that.

Where are the object you what to change the visibility for ?

If it is a "top level" vi's controls/indicators you what to change the visibility on in a sub-vi, then you need to supply the sub-vi with an array of references for the controls/indicators.

0 Kudos
Message 4 of 4
(1,041 Views)