04-27-2009 10:43 AM
I have done some searching to see if there was already a question like this, but I didn't see one. If there are others that are similar enough point me there, or tell me to keep looking. (Don't do that ) Otherwise, thanks for reading.
Background: I am maintaining VIs written in LV 8.0. I am working with a Strict Type Def, which is a cluster, with some ring elements, numeric, and boolean elements, totaling 21 different elements. In the main VI, there is an event structure. In different events, different elements of the cluster are disabled. In some of the events, I want to call another VI with the Strict Type Def. The new VI will need to have the appropriate elements in the cluster disabled. There is a possibility of some elements changing these or other properties that need to be passed up to the calling VI.
So the question: Is there an easy way to pass the properties of the elements in the cluster other than passing each property separately or in a cluster? It might not just be one property per element either.
Thanks in advance.
brian
04-27-2009 11:09 AM - edited 04-27-2009 11:11 AM
For complicated GUIs I use anAction Engine designed for the app.
In the "init" action I cache the control refs I will use during the run.
When it comes time to change how thing look I invoke the appropriate action and set all of the properties inside the AE.
In your case you laso ahve to cache the ref to the sub-VI's control but the idea is the same. Just do the same thing to both and you should be OK. You COULD cache all of the cahnges and then apply them latter but that complicates things.
I hope that helps,
Ben
04-27-2009 11:25 AM
Ben,
I was hoping for something a little easier, but not counting on it. Let me digest this for a little while, and if I have more questions, I will get back to you.
Thanks,
Brian
04-27-2009 11:38 AM
bjstaff wrote:Ben,
I was hoping for something a little easier, but not counting on it. Let me digest this for a little while, and if I have more questions, I will get back to you.
Thanks,
Brian
I'd like yo hear about an easier method myself.
Here is another way you could do it (but the former method is easier to follow).
You could use a ref from both type defs and iterate through each element and match up the properties of one with the other. This Nugget illstrates how to get at sub-elements of complex clusters. Please note that Nugget focused on the data while you are interested in the properties so that Nugget is for inspiration only.
Ben