LabVIEW Idea Exchange

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

Type Def made inside a library VI should be part of the library

Status: New

Currently, when you right-click -> "Make Type Def" on a control / constant in a library VI, the new unnamed type definition is created outside

the library.

Also, it has the default control icon: raphschru_0-1665514290538.png

instead of a library control icon:       raphschru_4-1665514883384.png

 

This leads to 3 additional tasks:

1. Drag and drop the control inside the library from the project explorer.

2. Edit the control icon to make it have the library control icon (with the horizontal slider glyph).

This is annoying because you need to copy it from another library control icon.

3. Go to the library properties and make "Apply Icon To VIs".

 

Bonus bug: If your new type contains a library-private subtype, the new control magically disappears from the project explorer when you click on it.

 

In comparison, the "Create SubVI" function works perfectly inside a library, i.e. it creates a VI inside the library and with the icon banner.

I think the "Make Type Def" function should behave the same to make library development more coherent and intuitive.

4 Comments
MikaelH
Member

I see that you don't use OpenGDS's icon editor.

It will automatically detect that the type def belongs to the class and adds it and creates the correct icon for you.
1) Create and save the type def in the same folder as the library or class (or any of it's sub folders).
2) Tools->GOOP->Create VI Icon
3) Press OK when asked if you want to add this type def to the library or class.
4) Done

raphschru
Active Participant

Hi Mikael,

 

Indeed I could use a tool for that, but that's still more steps to achieve what could be done instantly by LabVIEW.

The technique I'm using as a workaround right now is: right-click the Library -> New -> Type Definition, then copy / paste the control in the new Type Def. Then it has the correct icon.

 

Also I've tried the OpenGDS icon editor several times by the past (currently v. 1.2.72.135). Although it seems very well developped, I found some ergonomy issues to make it fit my own development habits. But we should probably talk about it in a dedicated OpenGDS discussion group / topic.

_carl
Member

I've been regularly annoyed by a similar issue with poloymorphic VIs.  Since they have to be created at the project level, you have to go through the same steps to update the icon.

 

Another annoyance with the process above: any time you use "Apply Icon To VIs" on a library/class, it forces a resave of every VI/typedef in the library/class, which is rather obnoxious when using source control and working on a multi-developer project.

JÞB
Knight of NI

Kudos!  But expand the Idea to support Create New... inside any folder in any lvlib, Class or Project folder.


"Should be" isn't "Is" -Jay