LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create multi-dimensional arrays of controls?

Solved!
Go to solution

This is how I would prefer to do it, but I don't see how to (a) literally create the third dimension and (b) how to split a multi-dimensional array among different places on the front panel.

 

In other words, I see how to drag the index block down to create a third dimension, like so:

 

three dim array.PNG

 

But now what?  How and what do I drag to create the third dimension?  How can I take the third dimension 2D arrays and put them on other tabs?

0 Kudos
Message 11 of 14
(493 Views)

A couple of ways to do this.

One way would be to put 2-D arrays on separate tabs of a Tab Control.

Your data structure will be 3-D but you'll end up with N 2-D controls.

 

I think I'd actually prefer to have some sort of Enum selector for Page and a single 2-D array control.

This approach requires a bit more complex handling on the block diagram side.

0 Kudos
Message 12 of 14
(485 Views)

@jordanglassman wrote:

But now what?  How and what do I drag to create the third dimension?  How can I take the third dimension 2D arrays and put them on other tabs?


Remember that you cannot use different labels for array elements. Such properties are the same. You might want to use an array of clusters, each cluster containing a boolean and a string, for example.

 

As I said, you don't need to place anything on tabs. Place the array directly on the front panel and hide the index terminal and use something else to select the plane (slider, numeric, enum, ring, etc.). If you want it to look like tabs for plane selection, place ar narrow tab strip above it and make the tab area nealy zero. Label the various tabs and switch to a different 3D array plane whenever the tab is changed.

 

If this is used often, you can make the entire construct into an Xcontrol. This has the advantage that it even "works" when the parent Vi is in edit mode.

0 Kudos
Message 13 of 14
(482 Views)

altenbach wrote: 
... You might want to use an array of clusters, each cluster containing a boolean and a string, for example.

 

As I said, you don't need to place anything on tabs. Place the array directly on the front panel and hide the index terminal and use something else to select the plane (slider, numeric, enum, ring, etc.)....


Here's a quick example (LabVIEW 8.2) using a radiobutton to select the array page. Maybe it can give you some ideas. 😄

Message 14 of 14
(446 Views)