LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

get a row using the array index of a 2D array

I want to get a single row using the array index of a 2D array on the red circle in the picture.

But the array index function doesn't connect my 2D array.

teach me solution!

Download All
0 Kudos
Message 1 of 7
(7,775 Views)

Just wire the 2D array up. It will adapt to the type.

image.png

0 Kudos
Message 2 of 7
(7,745 Views)

Yes, Index array is the correct function, but it is not clear why you cannot connect to it.

 

Code is a bit of a mess. Where is the 2D array you are trying to connect to it? Are you sure it is an array?Do you get a broken wire? What message do you get in the context help when you hover over the broken wire?

0 Kudos
Message 3 of 7
(7,717 Views)

@altenbach wrote:

Yes, Index array is the correct function, but it is not clear why you cannot connect to it.

 

Code is a bit of a mess. Where is the 2D array you are trying to connect to it? 


There are a number of array functions right in the center of the VI, some of which are 2D Index Array functions.  However, the data wires going into these functions are all screwed up -- many of them look like they are connecting the input of one function to the input of another, but really one of those wires is actually connected to a function output, it just was brought "under" the function from the left and connected to the output connector on the right edge!  Don't Code Like That!  Make your wires run strictly left-to-right (unless you are writing in Arabic or Hebrew, when right-to-left might be more appropriate), and try to keep them straight with as few bends as possible.  That will make your code much clearer.

 

You are dealing with 2D Arrays of strings.  2D Arrays of numbers are easy to recognize from the "double-wire" nature of the wire, but strings use "fuzzy wires" and it's hard to tell a String from a 1D Array from a 2D Array.

 

But the LabVIEW Tutorials cover Arrays in great detail -- were you paying attention when you studied the Tutorial, or listened to the lecture?  Did you work any simple (numeric) examples?  Did you read the LabVIEW Help on Index Arrays?

 

Bob Schor

Message 4 of 7
(7,689 Views)

I solved this Issue. thanks but I have one more Question.

 

There is a mouse down event for a two dimensional array.

However, pressing the vertical scroll also executed mouse down event.

I want to prevent the mouse down event from executed in a vertical scroll. Is there a way?

0 Kudos
Message 5 of 7
(7,654 Views)

All parts of the Array on the UI will trigger the event. You'll need to check the mouse position compared to the scrollbar to filter it out. 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 7
(7,646 Views)

@adavb wrote:

There is a mouse down event for a two dimensional array.

However, pressing the vertical scroll also executed mouse down event.

I want to prevent the mouse down event from executed in a vertical scroll. Is there a way?


You continually start new threads about the same code. I would recommend and go back and actually read all our suggestions, because we already recommended a better solutions three days ago. There are also other suggestions that you have ignored so far.

Message 7 of 7
(7,636 Views)