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!
crelf

Create type def from block diagram constant

Status: Completed
by Active Participant crelf on ‎06-02-2009 01:05 PM
As mentioned here, "I lost count of the times where I have a cluster or enum constant that I want to make into a type def and have to first change it into a control, switch to the FP, and then select customize" - it'd be great to be able to right-click on a constand (like a cluster) on the block diagram and select Advanced -> Make Type Def (of course, you'd need to save the type def somewhere).
Status: Completed
Available in LabVIEW 2011
Comments
by Trusted Enthusiast on ‎06-02-2009 03:02 PM
I have done this atleast 2 times today alone.  I use labview everyday for over a decade so I have done this thousands of times in my life,  this feature would save me a many hours by the end of my career.
by Member Vinny_Burzi on ‎06-02-2009 08:22 PM
I agree this would get lots of use.  Therefore, I suggest not putting it under the Advanced menu when you right-click, just put a selection a the top level of the right-click menu.  When you select Make Type Def it would then just give you a save as dialog.
by Active Participant nrp on ‎07-23-2009 10:00 AM

Are there cases when you do not want to use a typedef?

 

For me virtually every single data type is a typedef, so it starts its life via a right click on the project virtual folder --> create control.

by Knight of NI on ‎07-24-2009 05:16 AM
I agree that this would be a useful feature, so I have posted a plugin for the JKI RCF that creates a typedef from a constant here.
by Member ChethanR on ‎09-22-2010 01:36 AM

Hey guys,

 

We were brainstorming possible approaches to the feature and came up with the following ideas.

 

  1. Provide a new menu item, "Make type definition" that does not open the control editor, but presents a file prompt to decide the file name for the typedef. This menu item is applicable to both block diagram constants and front panel controls. We would retain the "Customize" menu item as it is.
  2. New menu item, "Make type definition" that opens the control editor but defaults the ring to "type definition." One more issue regarding this is, the dialog box asking if you want to replace the constant with the typedef. Is the dialog necessary as we are creating the typedef for the sole purpose of using it?
  3. Enabling the "Customize" menu item on the block diagram constant popup, which works exactly like it does on front panel controls.

Let me know what you think of this.

by Knight of NI on ‎09-22-2010 07:02 AM

Ideally, I would probably prefer if there was an option which immediately replaced the constant with a typedef, without even requiring the user to save it. This has an issue in that there's no indication that anything happened and that you will be asked to saved the typedef when it leaves memory.

 

In practice, the most reasonable solution is probably #3, mainly because it has identical behavior to what users are already used to.

by Trusted Enthusiast on ‎09-22-2010 09:58 AM

> In practice, the most reasonable solution is probably #3, mainly because it has identical behavior to what users are already used to.

 

#3 feels really weird when we talked it through. The control editor that appears today starts off set to "custom control", which is not what anyone wants from the diagram. Most of the "customize" aspects aren't even reflected on the diagram, so calling it "customize" is odd, at best, or misleading, at worst.

by Trusted Enthusiast on ‎09-22-2010 10:22 AM

AQ - I agree it seems out of context to use the term "Customize". It seems the root problem is that type defs are created and controls are customized using the Control Editor. If there were two clear tools - Typedef Editor and Custom Control Editor - the definition would be clear: a new menu item called "Create New Typedef" would launch the Typedef Editor, and the context of visual customization would not even present itself.

 

This is another topic altogether, but if the granularity of the Control Editor was redefined (the root problem resolved), there would be little question how to present the UI for this Idea. (This is probably an unlikely venture with LabVIEW as we know it, given the inertia of the Control Editor.)

by Trusted Enthusiast on ‎09-22-2010 10:40 AM

> (This is probably an unlikely venture with LabVIEW as we know it, given the inertia of the Control Editor.)

 

More than that, if refactoring the control editor is a prereq for this idea, I guarantee it doesn't get attention in LV 2011. Focus on keeping the feature small and low risk if you want it in 2011... which brings us back to the three options laid out by Chethan, or some variant thereof.

 

More customer input needed here!

by Trusted Enthusiast on ‎09-22-2010 10:49 AM

> ...if refactoring the control editor is a prereq for this idea...

 

Don't mind me, just daydreaming. #1 seems like a good step in the right direction with the new menu item "Create New Typedef".

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
134
85
74
67
65
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