LabVIEW Idea Exchange

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!
Top Authors
cancel
Showing results for 
Search instead for 
Did you mean: 

Create type def from block diagram constant

Status: Completed
Available in LabVIEW 2011
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).




Copyright © 2004-2020 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
31 Comments
Trusted Enthusiast
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.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Member
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.
Active Participant

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.

_________________________
All your base are belong to us.
Knight of NI Knight of NI
Knight of NI
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.

___________________
Try to take over the world!
Member

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.

Knight of NI Knight of NI
Knight of NI

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.


___________________
Try to take over the world!
Proven Zealot

> 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.

Trusted Enthusiast

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.)

Wirebird Labs: Expert Toolkits for LabVIEWDeploy, by Wirebird Labs: Expert Toolkits for LabVIEW
Proven Zealot

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

Trusted Enthusiast

> ...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".

Wirebird Labs: Expert Toolkits for LabVIEWDeploy, by Wirebird Labs: Expert Toolkits for LabVIEW