10-22-2008 08:17 PM
Solved! Go to Solution.
10-22-2008 09:07 PM
One way to avoid this problem is to insert a local variable from the menus and not by right clicking on an indicator/control and creating one.
If you insert from the menu, then the local variable is not assigned to any control/indicator and a '?' appears in the local variable. You can copy /paste this without duplicating anything on the front panel since this local variable is not associted with any control/indicator. You can then easily left click on the copied local variable and select the indicator/control you want to associate it to.
I have attached a screen shot also to clarify this aspect.
Hope this helps.
Regards
10-22-2008 09:20 PM
10-22-2008 09:24 PM
Instead of Copy-Paste, you can do a Ctrl+Mouse drag operation to make a copy of that local var without getting duplicated on the FP.
Then, if you wish to connect it to some other variable, lt-click on it & select the variable of your wish, thats all.
10-23-2008 10:10 PM - edited 10-23-2008 10:14 PM
Mani,
When you have 50 to 100 objects, not just local variable but any objects in a given panel, this method becomes obviously very cucumbersome. And this is exactly what I have been doing. Thanks though. Thanks guys, Jerod's suggested trick works great.
08-24-2009 12:46 PM
08-30-2013 12:08 PM - edited 08-30-2013 12:08 PM
I know this is an old thread, but this is something that has also been frustrating me for a long time. Has NI made any progress making actual copy and paste of local variables possible (not just CTRL-Drag)? If there is a particular group of programmers that prefer it the way it is, I think it would be better if there were a Preferences Menu option for this, to allow us to turn this feature on or off depending on preference perhaps?
08-30-2013 12:16 PM - edited 08-30-2013 12:24 PM
@R.Gibson wrote:
I know this is an old thread, but this is something that has also been frustrating me for a long time. Has NI made any progress making actual copy and paste of local variables possible (not just CTRL-Drag)? If there is a particular group of programmers that prefer it the way it is, I think it would be better if there were a Preferences Menu option for this, to allow us to turn this feature on or off depending on preference perhaps?
I think the current behavior is entirely sufficient. How many copies of local variables do you possibly need! 😮 Also remember that you can paste to a different VI, where the local variable would not make sense without associated control.
However, if you think you have a good idea for a new feature, the LabVIEW Ideas Exchange would be the right place to post it.
(There are already some related ideas, for example Fix Copy/Paste for property nodes, local variables, etc)
08-30-2013 12:36 PM - edited 08-30-2013 12:39 PM
It's not that I need a lot of copies, its simply a matter of convenience and efficiency of time utilization. When I want to copy a block of code that uses local variables from say, one state to another in a state machine, historically I have made a bunch of unassigned local variables off on the side of the page that I can drag in and asign as needed. However that required me to essentially re-invent the wheel (code block) each time (not convenient or fast).
After reading this thread, I tried doing the CTRL-Drag trick, which is certainly more convenient, in that I can copy the code block off page, then change states (cases) then copy (or move) the code block into the new state. However, this requires scrolling the workspace to make room for the temporary storage of the coppied code block...again, simply inconvenient and an inneficient use of my time. Not that it's a lot of time, but it all adds up. When you have limited time to complete a project, minimizing these inefficiencies can be critical. IMHO, this is what the clipboard is for. If we could simply use CTRL-C and CTRL-V, it would be much more convenient!
You are right about Property Nodes having the same issue...I just deal with them less frequently, so it wasn't at the top of my list. 😉
08-30-2013 01:22 PM
@altenbach wrote:
Also remember that you can paste to a different VI, where the local variable would not make sense without associated control.
Does a copy-pasted Property Node pastes the associated control or creates a new control/indicator in another VI, or at least in the same VI? Does that make sense?