01-18-2012 10:51 AM
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!
Solved! Go to Solution.
01-18-2012 11:09 AM
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 ?
01-18-2012 11:21 AM
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
01-18-2012 11:35 AM
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.