06-02-2014 10:14 AM
I was about to post a new idea for the Replace and Insert plugin of QD, but I saw that Steen as already posted this idea:
http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Quick-Drop-from-clipboard/idi-p/2620093
Is it something that can be possible to implement with scripting?
Thank you
Dany
06-02-2014 10:20 AM
The scripting methods that Replace and Insert currently use do not have a parameter for specifying that the replace/insert should use the clipboard contents. So without changes to the methods themselves, this would have to be implemented by pasting the clipboard contents in a dummy VI, then replacing/inserting that VI and inlining it. That's how I'd try to do it, anyway...if anybody has any better ideas, I'd love to hear them, as I've always wanted this functionality as well.
06-02-2014 10:20 AM
There have been discussions about inserting contents of the clipboard. Here is one.
https://decibel.ni.com/content/message/57199
Yes it could be done with scripting. The right click framework apparently had a working demo of a tool that would do this, but was never released for one reason or another. It would probably take a lot of work.
Maybe the easiest would be to use already existing code to perform the insert. Say you make a untitled.vi and paste in the contents of the clipboard into the VI, connect terminals, then perform a subVI insert, then perform the native inlineing of the VI, replacing the subVI with the contents of the VI.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-02-2014 10:50 AM
Hooovahh wrote:
Maybe the easiest would be to use already existing code to perform the insert. Say you make a untitled.vi and paste in the contents of the clipboard into the VI, connect terminals, then perform a subVI insert, then perform the native inlineing of the VI, replacing the subVI with the contents of the VI.
That look like a good way to achive that, I will give it a try, if I got spare time this week
06-21-2014 08:57 PM
I made the modification to the existing Replace/Insert to archive the Replace / Insert from clipboard but I need your comment and maybe the approval of Darren. Currently I support only Clipboard with 1 element.
https://decibel.ni.com/content/docs/DOC-37366
https://decibel.ni.com/content/docs/DOC-37367
Thank you
06-21-2014 10:37 PM
Awesome work, can't wait to test it out and see how it works.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-23-2014 08:09 AM
Congradulations on a getting this Insert/Replace with clipboard working. I was hoping you took my advice and attempted to paste the clipboard into a new VI save it, insert, then inline because then it would work on multiple objects, but its not like I was able to come up with a solution.
But now that I think about it it isn't often I would want to insert a group of objects, most the time I just happen to have one subVI in my clipboard I want to insert.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-24-2014 09:43 PM
06-25-2014 07:36 AM
Yeah inspired by your first go I tried doing the method I described. Pasting into a new VI, was easy, and inserting and inlineing was easy. The difficult part was knowing what controls should be made from the pasted contents, and then wired to the connector pane, so that the insert function can run like normal. For a single function or subVI it would be relativly easy to read the nodes connector pane and make it the same in this temporary subVI but for a group of functions I had a harder time.
Still I started taking your code and putting it into our reuse library so that other developers can use the insert and replace with clipboard, but when I saw your insert didn't follow the same rules as the insert in 2012/2013 I rolled it back. Far too often I am inserting a bundle by name and there are branches that the 2011 style insert would not insert where I wanted.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-25-2014 08:58 AM