From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
juergen

Auto index by row or column

Status: Duplicate

Hi all

 

What I need is the possibility to auto index a 2 dim array by column or by row

 

With a right click at the tunnel to have this two options

 

Jürgen

Array.JPG

 

6 Comments
RavensFan
Knight of NI

This is a duplicate of Allow user to select dimension when array indexing in For/While loop which really needs to get more kudoes.

 

(And also Auto-indexing Tunnels and Multi-Dimensional Arrays).

 

Until this idea is selected and implemented, the easy solution is to transpose the 2-D array before sending it into the loop for auto-indexing.

altenbach
Knight of NI

Adding a "transpose" before the tunnel is actually very cheap, because it only changes a flag and does not actually touch the array in memory. It is not a big deal.

 

For a complete idea, you would also need the same functionality at the output tunnels.

X.
Trusted Enthusiast
Trusted Enthusiast

Or this idea...

juergen
Member

Hi altenbach

 

When I use the transpose function the "show buffer allocation tool" show me that LabVIEW is using a new buffer

 

Jürgen

altenbach
Knight of NI

It might need to make a new copy for various reasons (e.g. branching), but it might just flag it as "transposed" instead of shuffling around all elements. I don't know the details. Autoindexing on colums might also be less efficient, because column elements are not adjacent in memory.

 

 

MaryH
Member
Status changed to: Duplicate