LabVIEW Idea Exchange

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

Make 'Type Def.' the default choice in the control editor

Status: Completed

Available with the "Make Type Def." right-click option. Use this when you want to make a control a type def. Use Advanced > Customize when you want to customize the appearance of a non-typedef control.

99% of the times I use the control editor, especially when I call it using Advanced -> Customize, I want to create a type definition, not a custom control. However, the default setting in the control editor is 'Control'. From time to time it happens that I forget to switch the setting to 'Type Def.' which means that once I realise the mistake I have to replace all the instances that I already put in the code somewhere.

If the default wer 'Type Def.' even if I actually wanted a control and forgot to change the setting I could simply open the type def and change the setting, automatically fixing all the instances.

 

Personally I would not have a problem with only making 'Type Def.' the default setting when it is called through the Advanced -> Customize link and leaving it at 'Control' when the control editor is opened through New -> Control.

8 Comments
crelf
Trusted Enthusiast
Would you want the default to be "Type Def" or "Strict Type Def"?  Maybe if you create it from the FP then it should default to strict, but if you do it from the BD then it should just be a type def by default...




Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
hfettig
Member

Personally I would prefer "Type Def" and please do tell me how I can access the Advanced -> Customize function from the block diagram. 😮

 

Maybe that would be a way to do this by having an Advanced -> Make Type Def on the BD. 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.

crelf
Trusted Enthusiast

hfettig: "please do tell me how I can access the Advanced -> Customize function from the block diagram"

 

Ha!  😄  You can't, but I'd sure like to be able to!  I'm going to add that as a spearate idea....





Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
altenbach
Knight of NI

> Personally I would not have a problem with only making 'Type Def.' the default setting when it is called through the Advanced -> Customize link and leaving it at 'Control' when the control editor is opened through New -> Control.

 

This I see as a problem, because things should remain the same unless specifically changed. Customizing a control should show what it currently is in the control editor.

 

Sometimes we only want to change some cosmetic for the current VI, without even saving it as *.ctl.

 

How about having a "save as:" dialog similar to the one we get with VIs (where we have radio options such as "overwrite, create new copy, etc.) For controls, this dialog could let us pick between saving it as a control or a typedef, etc..

 

Vinny_Burzi
Member

hfettig wrote:

99% of the times I use the control editor, especially when I call it using Advanced -> Customize, I want to create a type definition, not a custom control.


 

I suggest leaving the Advanced -> Customize functionality the way it is, and instead adding a new option to the right-click menu that allows you to save a control as a Type Def without the need of going to the control editor (instead you just get a save as dialog and when your done saving it the control is changed to the Type Def).  See this idea regarding the same functionality for a block diagram constant.

johnsold
Knight of NI

Although like the OP, I usually use the control editor to create typedefs, I like altenbach's idea of a Save As option.  This does not generate a custom Icon, but since the control icon only shows up in the hierarchy view, I do not see this as a big drawback.

 

Should a control which has been saved as a typedef be marked some way on the BD?  I do not have any good ideas about how to do this or even whether it is a good idea.  Certainly it could be handy in tracking down which constants were made form the typedef and which were created before the control was typedefed.

 

Lynn

LabBEAN
Active Participant

 


crelf wrote:

Would you want the default to be "Type Def" or "Strict Type Def"?  Maybe if you create it from the FP then it should default to strict, but if you do it from the BD then it should just be a type def by default...


 

I gave kudos, but always set "Strict Type Def" unless there's a reason not to.  When a type def has FP presence (e.g. not a constant-only type def where this is a moot point), most appear only on subVI FPs (not the end user UI) and I prefer all instances to look alike.


Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
Darren
Proven Zealot
Status changed to: Completed

Available with the "Make Type Def." right-click option. Use this when you want to make a control a type def. Use Advanced > Customize when you want to customize the appearance of a non-typedef control.