07-02-2014 12:58 PM
Hello all,
Iam interested in knowning (after the user changes the value of a cluster) which element inside a cluster (any type of cluster) was changed.
so in an event structure case (clustername value change) i can get ctl ref, old val, new val.
On the other side I would like to get the either the refnum or name
I know old and new val will need to be variant (on my function) so that i can accomodate for any cluster. I have open G installed on my machine and have looked into the Open G LV data pallet as well as a Vcluster subpanel and havent been able to do this.
Here is an example of a given cluster
Here is another cluster example:
I have been able to do this in two different ways (always knowing before hand the cluster.
Method one:
Method two:
Here is the skeleton of the function iam trying to build(testing the different possibilities):
So far I havent been successfull in this.
any help will be apreaciated.
regards,
Solved! Go to Solution.
07-02-2014 01:54 PM
This will get you the name of the 1st cluster item that is different from New Val
07-02-2014 01:54 PM
Try this to get the old and new value along with the control name changed.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
07-02-2014 02:01 PM
yes, but i still dont know which element inside the iner cluster changed.
example 1st cluster if i change say (electrical fault)
that array you sent will tell me that father cluster changed (only)
that i have been able to do.
thanks anyways
07-02-2014 02:05 PM
as soon as I changed your cluster with mine (with cluster inside cluster) the new/old value took a dump and lv started to complain. value change is good but i need name as well (at least)
thanks any ways hoovah.
07-02-2014 02:06 PM
Cluster in Cluster in Cluster etc...
You are going to have to recursively work down through levels of Clusters to get to the value.
A VI that you call recursively can walk down the cluster chain passing in the Old and new value.
There are posts about recursively walk down complex data control.
07-02-2014 02:07 PM - edited 07-02-2014 02:09 PM
@El_Tipo wrote:
as soon as I changed your cluster with mine (with cluster inside cluster) the new/old value took a dump and lv started to complain. value change is good but i need name as well (at least)
Yes, that is why you have to use the method that I posted.
07-02-2014 02:21 PM
Try this
07-02-2014 02:21 PM
Omar,
could you add a link of such recursively walk down examples (or posts)
regards,
07-02-2014 02:23 PM
Omar,
thanks for posting this.
Iam going to give it a try.
regards,