LabVIEW Idea Exchange

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

A more compact form of Index Array for constant index values and single output

Status: New

Compact Index Array.png

"If you weren't supposed to push it, it wouldn't be a button."
13 Comments
paul_cardinale
Trusted Enthusiast

 

It uses about 70% less area.  I consider that a significant improvement (yet somehow you consider that on a little gain in compactness).  And I find it quite readable; in fact it seems to me that it's no less readable than using numeric constants feeding in to Index Array.  Of course as with all text in LV, you can change the font (including the size) to whatever.you want, you can even make the commas bigger than the numbers.  (Besides, 4D arrays are exceptionally rare; and if you really want to do strange things with arrays that have an excessive number of dimensions, nothing would prevent you from using the existing Index Array function.)

"If you weren't supposed to push it, it wouldn't be a button."
GregSands
Active Participant

Just for fun I coded a Q&D XNode which does what you want.  Use at your own risk!

Compact Index Array

https://lavag.org/topic/19873-compact-index-array/

Mythilt
Member

The 4D was an example, I've had to use 3D arrays quite a lot in some projects, and my example would fit with that as well. (Even with 2D it could be very easy to miss the difference between [7,] and [,7].)

And I didn't say it wasn't more compact, I said that I felt that it didn't gain much in compactness and it wasn't worth the loss of readability I think it would entail.  I will note as indicated in my first post, I almost always put the index array in line with the array wire, not as part of a branching off, so it is already compacted enough to me.

 

Just going to say I disagree, I won't complain if it is added, but I also won't compain if it isn't.

Jon D
Certified LabVIEW Developer.