LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I paste code directly into a case structure?

Solved!
Go to solution

Hello all.  I'm running Labview 8.6.1, and have a small issue.  I'm trying to copy a piece of "code" from an old block diagram into a new one.

 

This works fine if I just paste it into a blank space.  But if I try to paste it directly into a case structure, I lose all of the wires and the code seems to sit on top of the case structure rather than getting embedded into it.

 

One solution is to paste this old code into blank space and then to drag it to the case structure.  This works fine.  But is it possible to paste code directly into the case structure?

 

Thank you.

0 Kudos
Message 1 of 8
(3,585 Views)

Can you post your part of old code that you want to copy to a new BD inside the case structure.

 

Mathan

Message 2 of 8
(3,577 Views)
Solution
Accepted by topic author jkeane3
For some reason when you try to paste directly into a case structure, the code is floating, I figure there is a reason for this probably to do with tunels in the structure.  I usually paste as a floating code over the case structure then drag it slichtly so it is nolonger floating.  The new code snippletts might get around this but this is not avaliable in 8.6 only LV2009
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 3 of 8
(3,566 Views)

Thanks for the replies.  I have noticed that pasted code is always floating like the second reply here points out, so I have done the dragging thing to get it to stick.  However, earlier when I was trying it didn't seem to work.

 

I just went back and tried some more, though.  I guess I just had to drag it a little farther, and then the code sticks into the case stucture.  A slight drag in one direction was not far enough, and the code kept floating on top of the block diagram.

 

Sorry...easy fix here.  Maybe at least next time a newbie searches for this problem on the forum this post will help?

Message 4 of 8
(3,561 Views)

jkeane3 wrote:

Maybe at least next time a newbie searches for this problem on the forum this post will help?


Obviously yes Smiley Happy Thanks for it.

 

Mathan

0 Kudos
Message 5 of 8
(3,557 Views)
You get a visual indication when the code you are pasting is actually inside the case statement (while loop, for loop, etc.). You will see a dashed line around the interior of the structure.
Message 6 of 8
(3,548 Views)
Also be sure the case structure area is big enough to hold the code you are trying to paste or it will just sit on top like that.
---------------------------------
[will work for kudos]
0 Kudos
Message 7 of 8
(3,539 Views)

rex1030 wrote:
Also be sure the case structure area is big enough to hold the code you are trying to paste or it will just sit on top like that.

 

Not true. The structure can be as small as you can make it if autogrow is enabled. This is the default for all structures.
0 Kudos
Message 8 of 8
(3,536 Views)