LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D array - how do i copy one page to another?

Solved!
Go to solution

For the life of me, I can't figure it out.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 1 of 8
(2,191 Views)
Solution
Accepted by topic author billko

By "Page", I assume you mean the 2D array indexed by the third Array Index.  Use Index Array with the third Index wired to the Page you want, and use Insert Into Array (assuming you want to Insert, instead of Replace).  Here a Snippet:Insert PageInsert Page

Bob Schor

0 Kudos
Message 2 of 8
(2,158 Views)

Hi, Bob:

I did not state my problem very well.  (It seems that I can dispense great advice with how to do that, but I can never accomplish it, myself.)

 

I meant that I couldn't find a way to select the displayed data from the front panel (in dev mode) and copy it to another "page".  I could select individual elements and copy them, but not multiple.  There's some tantalizing menu selections in the "advanced" menu about selections, but I couldn't figure out hot to use them.

 

Another solution checkmark awaits you if you can help me figure it out.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 8
(2,153 Views)
Solution
Accepted by topic author billko

I found this little gem.  How tedious.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 8
(2,151 Views)

Yikes!  On the one hand, I'm glad the Question I Answered was not the Question You Were Asking (I was getting a little worried about you!).  However, I'm still unsure what it is you want to do.  

 

I just did the following -- I had a VI I was examining that a Forum member had posted, and a blank VI I created with Ctrl-N.  I selected multiple elements from the Front Panel of the first VI (using Shift-Click to select multiple individual elements), then Click-Dragged them to the Blank VI.  Not only did those selected elements Copy, but they retained their Front Panel spacing and names.  Is this what you are trying to do?

 

I did look at the routine you mentioned in your response, but am still unsure that I "understand the problem".  I probably need to take a nap ...

 

Bob Schor

0 Kudos
Message 5 of 8
(2,138 Views)

@Bob_Schor wrote:

Yikes!  On the one hand, I'm glad the Question I Answered was not the Question You Were Asking (I was getting a little worried about you!).  However, I'm still unsure what it is you want to do.  

 

I just did the following -- I had a VI I was examining that a Forum member had posted, and a blank VI I created with Ctrl-N.  I selected multiple elements from the Front Panel of the first VI (using Shift-Click to select multiple individual elements), then Click-Dragged them to the Blank VI.  Not only did those selected elements Copy, but they retained their Front Panel spacing and names.  Is this what you are trying to do?

 

I did look at the routine you mentioned in your response, but am still unsure that I "understand the problem".  I probably need to take a nap ...

 

Bob Schor


I'm envious that you could use shift+click to select multiple elements.  I wonder if this is new for the later versions of LabVIEW?  (I'm using LV 2014 right now.)

 

Yes, this is very close to what I wanted to do, in that there were multiple elements in the array control that I wanted to copy to another array.  In this case, I wanted to copy the visible page of a 3D array and copy those elements to another page in a different 3D array.

 

As a side note, I still couldn't make proper use of the selection options to properly select and copy the data I wanted.  I suspect that it's because a "page" of data isn't a real thing; it's just constructed so we can picture 3D in terms of 2D slices.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 8
(2,127 Views)
Solution
Accepted by topic author billko

Thanks for the explanation -- I still didn't "get it" until your last post.  What I now think you want to do is to "select a page" from a populated Front Panel Control (or indicator) and copy it for use somewhere else.  I have no idea how to do this in any "direct" way -- what I'd do (if I needed to do this) would be to combine the two techniques I "misunderstood" earlier --

  1. Click-drag the 3D Array (as is) to a blank VI.
  2. Create a tiny LabVIEW program on the blank VI to alter the 3D Array, moving the selected Page, as you wish.
  3. Move the updated 3D Array back to the original VI (with a new name, if appropriate).

Note that you do the "manipulation" on an isolated VI, so you can inspect what you've done and make sure you "did it right" without risking the original VI.

 

Bob Schor

0 Kudos
Message 7 of 8
(2,110 Views)

Convergent evolution led me to the same conclusion.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 8
(2,104 Views)