LabVIEW Idea Exchange

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

Copy and Paste-Replace

Status: New

This is just an idea I had while working on a simple application.  I often find myself wanting to replace multiple objects on a block diagram in a repititive manner.  As an example, I have an application that uses a queue requiring an enumerated value as an input - when I started the application I didn't use a type definition, but I (of course) quickly arrived at a point where I needed to replace all of my constants with a type definition.

 

Right now I have a few options:

1) Delete the type definition and drop a new one down and wire it up

2) Right-click and select 'replace' and point it to the ctl file

both of which take a considerable amount of time to do over and over again.

 

Here's my idea...  I create the type definition once, and press CTRL+C while it's highlighted on the block diagram.  Then I select one (or multiple) items that I want to replace with this type definition and when I press CTRL+P it automatically replaces and wires the item in the copy buffer.

 

It's hard to illustrate, but I just wanted to throw it out there to see if anyone likes the idea.

Elijah Kerry
NI Director, Software Community
6 Comments
Darren
Proven Zealot

Assuming the typedef is in an open project, you can use Quick Drop Replace to replace multiple selected diagram objects with the new typedef.

jcarmody
Trusted Enthusiast

Kind of like the way it works on the Front Panel, right?  Except that uses CTRL+V.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

G-Money
NI Employee (retired)

If it was just a keyboard shortcut to replace Block Diagram objects with another (Ctl+C object you want to replace with, then select the object you want to replace and hit Ctl+V, and it will be replaced and wired up) would be pretty powerful. I don't know how much work would be involved and it would definitely take longer to paste but I think the idea is more elegant than a right-click menu. Darren is right that you can do it with a couple of keyboard strokes using Quick Drop and that works great but this would cut the number of steps down. I like it.

Darren
Proven Zealot

I like the idea, too. I was pointing out a workaround that can help today.  But I have often desired the ability to Paste-Replace on the diagram like I can on the panel.  Kudos.

AlexAAuck
Member

I just want to add my small voice behind this with an additional behaviour.

 

If I have a VI in my clipboard (via ctrl-x or ctrl-c) I want to be able to select a wire (or wires) and hit ctrl-shift-v to paste it into the wire line. Or, even just have the decent ctrl-v behaviour insert into wires.

shb
Active Participant
Active Participant

Similar idea: Drag & drop to replace