LabVIEW Idea Exchange

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

The ability to paste code to front panel as image

Status: New

If we select some code and try to copy it to the front panel, nothing happens of course because the code has no meaning on the front panel.

 

However, we can paste that same code into many other applications (e.g. MS Paint) and it turns into an image. We can immediately copy that image and paste it to the front panel. I often use this for forum examples, e.g. here.

 

Why can't we eliminate the middleman????

 

We should be able to paste code directly to the front panel and it will simply turn into an image of the code!

 

We should even be able to simply drag code from the BD to the FP for the same effect.

 

This could even be useful during code reworking. We could temporarily paste a picture of the old code to the FP so we can better remember what was connected where while we make modifications.

 

(It could even turn into a snippet so we can drag it back and it turns into code, but a plain image is probably sufficient)

 

6 Comments
AristosQueue (NI)
NI Employee (retired)

That would interfere with copy/pasting a comment or a constant from the block diagram to the front panel, which I do all the time. I would not like to suddenly get a picture of my comment or a picture of my constant instead of a text block or a control with the constant's value, which is what I get today. And having different behavior depending upon which items you had selected wouldn't be good behavior in my book.

crossrulz
Knight of NI

As far as the examples for the forums go, just use the Code Capture Tool.  You can make a snippet that shows both the front panel and the block diagram.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
altenbach
Knight of NI

Ah, good point. Yes there are some element that copy just fine, such as decorations, freel labels, etc.). I forgot about that.

 

I some graphics applications we can do a "paste special" (e.g. select "as image", "as text", "as object" etc.), but I am not sure how it could be implemented.

 

Maybe it should depend on what's selected. If the copying is allowed (only decorations, free labels etc are selected) it should act as before, but if the copying is disallowed because it also contains other elements, it should paste as image.

Yamaeda
Proven Zealot

The "Create snippet" could also copy the image to the buffer for pasting to the front panel, or a new menu option of "copy snippet" (maybe ctrl+shift+c?)

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
AristosQueue (NI)
NI Employee (retired)

I don't believe this is sufficiently common at all to warrant building a feature into LabVIEW. If you want to do this, copy your code, paste it into MS Paint or your favorite equivalent, then copy that and paste onto a front panel. I believe this is a rare enough request that that is a more than sufficient workaround.

altenbach
Knight of NI

Oh, yes, I have not problem working around this. 😄

 

It is a matter of patching holes. Whenever an intuitive response to a user actions exists, we should get that instead of the dreaded "no go!" cursor icon. In fact, that special cursor icon should become nearly extinct. 😄

 

Of course I don't want NI to spend excessive time on this. It should only be implemented if it would be trivial to do (AND only if it gathers enough votes here, of course ;)).

 

All underlying parts exist and have been already implemented: Code on the clipboard already exists as an image version (I guess, since we can paste into a drawing program!) and the front panel accepts pasting of images without problem.

 

Maybe it is just a matter of removing an unnecessary barrier, i.e. flipping a single bit somewhere in the LabVIEW UI. 😄

 

(It currently might even require more internal code to change the cursor instead of just allowing to paste the image).