LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Access to all properties of all objects within a subVI

Solved!
Go to solution

Dear All

 

I need to change some properties of some of objects on the front panel within another subVI, I don't want to make a "Reference" for each object and then manipulate its properties within another subVI, I want to some how send a reference which contains the information for all subjects to the subVIand then finally within the subVI I decide about the objects and their properties that I am going to manipulate.

So far I send the reference to "ThisVI"  to my subVI and try to access "all objects[]" on the panel and then try to poll all objects matching with my aimed object and then manipulate the properties as I wish (attached image). But the problem is that properties are different from each specific objecton the panel and I am not as free asI was on the main VI.

 

For example in attached image, is there any way to change a boolean value in this way?

 

Thanks in advance!

Best regards

Afshin

0 Kudos
Message 1 of 7
(3,700 Views)

Hi Afshin,

if you use a "strict" refnum (on the "to more specific class" function), then you get a boolean connector. To change it, right click on your constant, select change to control, right click on the control and select "strict" (or "add data type"), then you can change it back to a constant to use it as now.

 

Hope it helps.

Mike

Message Edited by MikeS81 on 01-21-2009 04:24 PM
0 Kudos
Message 2 of 7
(3,693 Views)

Dear Mike

 

Thank you for your fast reply! Yes it works for this boolean value (when I check "include data type and under "create" submenue make a property of the object which referes to value"). Is it also the case for any other object? for example can I do the same for "Waveform chart" to access to its "X scale" or "Y scale" etc properties?

 

Best Regards

Afshin

0 Kudos
Message 3 of 7
(3,684 Views)
Solution
Accepted by topic author Af_Dk

Hi Afshin,

yes it also works for the other references like waveform graph or chart. If you use the "strict refnum" constant to more specific class, then you get all properties which this object has.

 

Mike

Message 4 of 7
(3,681 Views)
You were already using the ClassID for switching.  This is good.  The ClassName gives you similar information, but has been known to change from LabVIEW version to LabVIEW version.  It is good for display and for finding an element of a group (search for a substring of the specific item in the group), but cannot reliably be used for anything else unless you know you are not updating to a newer version of LabVIEW ever.
0 Kudos
Message 5 of 7
(3,643 Views)

Hi Afshin,

 

 

Since you are looking to exploit control references, you may want to take a look at my Nugget on Exploiting Control References.

 

Have fun,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 7
(3,630 Views)

Thank you all, for your instructive responses!

 

Regards

Afshin

0 Kudos
Message 7 of 7
(3,625 Views)