Quick Drop Enthusiasts

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to add "from clipboard" to the "Replace / Insert" plugin

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

LabVIEW ChampionArchitect
0 Kudos
Message 1 of 14
(10,509 Views)

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.

0 Kudos
Message 2 of 14
(5,786 Views)

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.

0 Kudos
Message 3 of 14
(5,786 Views)

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

LabVIEW ChampionArchitect
0 Kudos
Message 4 of 14
(5,786 Views)

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

LabVIEW ChampionArchitect
Message 5 of 14
(5,786 Views)

Awesome work, can't wait to test it out and see how it works.

0 Kudos
Message 6 of 14
(5,786 Views)

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.

0 Kudos
Message 7 of 14
(5,786 Views)

I pretty busy lately so I took the shortest solution . I think a solution with new VI and Inline should be feasible but much more complex. For the moment it cover most of my use case.

LabVIEW ChampionArchitect
0 Kudos
Message 8 of 14
(5,786 Views)

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.

0 Kudos
Message 9 of 14
(5,786 Views)

What do you mean by it not follow 2012/2013? I base my work on the 2013 Insert Plugin so it shoud work as 2013 work. Do you have suggestion to correct this issue?

LabVIEW ChampionArchitect
0 Kudos
Message 10 of 14
(5,786 Views)