NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Announcements
The NI Idea Exchange is a product feedback forum where NI R&D and users work together to submit ideas, collaborate on their development, and vote for the ones they like best. View all of the NI Idea Exchanges to post an idea or add your opinion on an existing one today!
acolbourn

Ability to copy structures and decide between making new variables or using locals of existing variables.

Status: New
by Member acolbourn on ‎07-25-2012 01:35 PM

For example, if I had a case structure with 50 cases and one variable in each case, I would like to be able to copy the case structure and have a new identical case structure with 50 matching local variables.  Currently it makes 50 new variables, so having the option to choose between generating new ones and generating locals of the existing would be extremely useful.  

Comments
by Knight of NI ‎07-25-2012 04:51 PM - edited ‎07-25-2012 04:52 PM

You can simply ctrl-drag the existing structure and it will make a second copy with all existing local variables retained. (try it!)

 

(Still, I think you are using the wrong code design pattern. This sounds like a nightmare to begin with. :smileyvery-happy:).

by Active Participant elset191 ‎07-25-2012 05:07 PM - edited ‎07-25-2012 05:09 PM

I think when he said "one variable in each case" he meant "one control or indicator in each case"  That's how I read it anyway.  If that's the case ctrl+drag would not help.

 

If he actually meant variable, then this is basically a duplicate of Fix Copy/Paste for property nodes, local variables, etc I think

by Knight of NI on ‎07-25-2012 05:33 PM

> I think when he said "one variable in each case" he meant "one control or indicator in each case" 

 

No real way to tell, but after looking at this post, you might be right. I always cringe when I hear the word "variable". :smileywink:

 

In any case, once such a structure is copied to the clipboard, how should later it know where it came from?. Apparently there should be a different result, depending on pasting it back to the same VI versus pasting it to a new VI?

by Member acolbourn on ‎07-26-2012 07:44 PM

Hey guys,

Sorry, meant to say one indicator in each case.  ctrl+drag ends up creating an entirely new set of variables.  The situation arose when my work decided it needed 50 separate indicators on the screen instead of the array I had (they wanted me to make each item physically look like a temperature controller as opposed to just a boring array of numbers).  Anyway, to make it work with my old program I had to put each indicator in a case from 1 to 50, but when I hit ctrl+drag to use it somewhere else in the program it generated new variables 51 - 100.  This meant I was forced to remake the case structure by coping local variables of each indicator.  You can then ctrl+drag if you're using local variables but if you use the original indicator you get new copies.  An option such as "copy by generating local variables" would be awesome.   

Latest LabVIEW Idea Exchange Blog Posts
About LabVIEW Idea Exchange

Have a LabVIEW Idea?

  1. Browse by label or search in the LabVIEW Idea Exchange to see if your idea has previously been submitted. If your idea exists be sure to vote for the idea by giving it kudos to indicate your approval!
  2. If your idea has not been submitted click Post New Idea to submit a product idea to the LabVIEW Idea Exchange. Be sure to submit a separate post for each idea.
  3. Watch as the community gives your idea kudos and adds their input.
  4. As NI R&D considers the idea, they will change the idea status.
  5. Give kudos to other ideas that you would like to see in a future version of LabVIEW!
Idea Statuses
Top Kudoed Authors
User Kudos Count
147
81
71
56
45
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page