LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scripting - Insert Front panel content

Solved!
Go to solution

Using QuickDrop, it is possible to insert the content of a front panel of a source VI into the current front panel. The source VI must be in the QuickDrop folder and an appropriate shortcut must be created.

 

How is it possible to do the same thing, copying the content a the front panel of a source VI into the front panel of a target VI, programmatically using Scripting?

Marc Dubois
0 Kudos
Message 1 of 5
(2,937 Views)

And what is the problem? Algorithm and functions, copying elements are exactly the same. 

Is the question "how to get reference to target and source VIs?"?  

Application Control -> Open VI reference.

Do you not have access to QuickDrop vi block diagram?

Use it as a subVI, provide target VI ref. I doubt path is absolute, so it will open source vi from location next to it.

0 Kudos
Message 2 of 5
(2,927 Views)

What I mean is that if I have VI references for A.vi and B.vi, I want to take the content of the front panel of A.vi (controls, comments, decoration etc.) and insert it in the front panel of B.vi.

 

My point about QuickDrop is that it has to be possible because you can create a shortcut to  do just that.  

 

I know how to do it from the front panel of A.vi (source) to the block diagram of B.vi (target), see below (it is probably not the best thing to do but it is just to illustrate my point). However, I have not found how to do it from front panel to front panel. 

 

Script_VI_BD.png

Marc Dubois
0 Kudos
Message 3 of 5
(2,906 Views)
One way to do this without scripting is to put the VI in your palettes with the "place VI contents" option checked. This has the effect of placing the contents instead of the SubVI. I know this works for the BD. I'm not 100% sure it work for FP controls/indicators but it places BD terminals which would place the control/indicator.
Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



0 Kudos
Message 4 of 5
(2,896 Views)
Solution
Accepted by topic author MarcDub

I found the method you were looking for... it is actually at the Pane level.  Hopefully, this is the missing piece you needed.

 

Paste to Front Panel.png

Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



0 Kudos
Message 5 of 5
(2,863 Views)