03-01-2022 09:43 AM
I am learning Labview on someone else's code. Right now I struggle to retrieve the clicked event of a button in an array of clusters.
Actually the first problem is, that I can't click the "select sensor" button in an array of clusters.
Afterwards I want to use the chosen clusters data. I would like to know if there is a better practice from which I should start.
03-01-2022 09:46 AM
You can't click them because "SensorList" is an indicator and not a control.
Since you're new to LabVIEW, it is recommended to go through the training materials available at the top of LabVIEW board.
03-01-2022 02:16 PM
Ok, I created a control and initialized it via local variable.
Now I get the desired SensorList Changed Event, when clicking "Select Sensor"
I read that I have to iterate the array of clusters in order to figure out which index actually changed. Is that strill true or is there meanwhile a more elegant way?
03-01-2022 02:45 PM
You can create a reference to the cluster item in the array and do a dynamic event registration for a value change of that cluster. That will return the cluster data of the edited cluster as variant data.
03-02-2022 03:52 AM
Can you give me further advice? I think my approach is starting wrong?
Do I have to iterate through the already populated array? I googled a lot but didn't find suitable examples
03-02-2022 06:08 AM
I found your answer here:
Solved: Re: How to obtain which element changed in a clusters using events? - NI Community
Since this answer describes the solution for only one cluster and not an array of clusters I am stuck.