LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get index of cluster and make popup vi for every event

example.jpgHi

 

I have problem. the problem is i have to find out the index of cluster.

 

I have an event "mouse down" from this cluster  and index should be the value where i put my mouse.

 

2nd thing is curently i am just abel to display only 1 popup. but i need each pop up for every every element where i move my mouse

 

thanks in advance.

BR

0 Kudos
Message 1 of 6
(2,535 Views)

1. Your event is not Mouse Down, but Mouse Move

2. Clusters don't have in index, only arrays. Therefore you can't return an index.

3. You can attempt to use the mouse coordinates to work out which element of the cluster has been selected, and work out the equivalent of an index.

4. What's wrong with just using the array control instead of a cluster? Then you have an index that you can properly determine.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 2 of 6
(2,517 Views)

Hi

 

thanks for respose

but, how can I determine index of array  if i use array instead of cluster?

 

BR

0 Kudos
Message 3 of 6
(2,474 Views)

(Please crop your images before attaching! Thanks.)

 

Use a "value change" event on the array and do a "not equal" on the old a new value. Only the changed value will result in a  true. Use search array to find the TRUE in the "not equal" array and the resulting index points to the changed element. You can do basically the same with clusters, by using "cluster to array" at the right time.

(If you insist on using mouse down events, you can gt the coordinates from the event terminals and thus calculate where it went down.) 

0 Kudos
Message 4 of 6
(2,457 Views)

It is possible because there is a cluster toolkit in VIPM that has an Index Cluster function. 

Capture.JPG

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 5 of 6
(2,435 Views)

altenbach wrote:

Use a "value change" event on the array and do a "not equal" on the old a new value. Only the changed value will result in a  true. Use search array to find the TRUE in the "not equal" array and the resulting index points to the changed element. You can do basically the same with clusters, by using "cluster to array" at the right time.


Here's what I had in mind (LabVIEW 8.2)

0 Kudos
Message 6 of 6
(2,426 Views)