01-21-2009 08:50 AM
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



Solved! Go to Solution.
01-21-2009 09:22 AM - edited 01-21-2009 09:24 AM
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
01-21-2009 09:49 AM
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
01-21-2009 09:52 AM
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
01-22-2009 08:44 AM
01-22-2009 09:07 AM
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
01-22-2009 09:16 AM
Thank you all, for your instructive responses!
Regards
Afshin