02-23-2009 02:54 PM
Hello,
I would like to write a subvi that takes in a dynamic cluster, accesses its controls[ ] property and acts on the results. I don't know if this can be done, or atleast have not thought of a viable option. If anyone has any ideas I would like to hear them. Let me know if I have not defined my problem well enough.
Solved! Go to Solution.
02-23-2009 03:05 PM
jmcbee wrote:Hello,
I would like to write a subvi that takes in a dynamic cluster, accesses its controls[ ] property and acts on the results. I don't know if this can be done, or atleast have not thought of a viable option. If anyone has any ideas I would like to hear them. Let me know if I have not defined my problem well enough.
This Nugget is probably not what you are asking.
Guessing at what you want have you concidered polymorphic that will adapt to the data type or LVOOP that will call the VI that is appropriate for your data type.
The Polymorphics determine the sub-VI called at edit time.
LVOOP determines the sub-VI at run-time.
Just throughing out ideas.
Ben
02-23-2009 03:11 PM
This is possible, make a 'Variant' type connector.
With the OpenG LVData toolset you can get all the info you need.
Ton
02-23-2009 03:14 PM
Ben,
I have considered polymorphic, but I want the subVI to be robust enough to handle any cluster with any number of and type of control inside it. I dont know much about LVOOP but I am guessing that it will have a similar limitation as to the polymorphic route. I was trying to figure out a way to do it with the variant data type but did not come up with anything clever.
02-23-2009 03:16 PM
02-23-2009 04:46 PM
02-24-2009 10:56 AM - edited 02-24-2009 10:57 AM
Here is the result of everyone's help. This VI will take in a variant data type (to handle the dyamic cluster) and will return the control names and datatypes that make up that cluster.