LabVIEW Idea Exchange

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

Create VI from type specifier

Status: New

It seems like every time I want to create a VI that has a connector pane which adheres to a particular type specifier, so I can pass a VI Reference into a subVI, I have to manually dig through the context help on that type specifier and find out what the desired connector pane is. Then after i create the VI and set up the connector pane, surely I will still get a broken wire on my reference, only to find out my connector pane connections are right, but my connection "requirements" don't match. I would love to have an option where you could right click a type specifier and "Create VI from type specifier" much like how we can create a callback VI from the register event callback node.

4 Comments
AristosQueue (NI)
NI Employee (retired)

It's a reasonable request. I'll add my kudos.

 

In the meantime... you can use this:

 

<labview>\resource\Framework\Providers\LVClassLibrary\NewAccessors\VIRetooler\CLSUIP_CreateNewVI.vi

 

The VIRetooler and its child classes are tools for creating new blank VIs from existing VIs, retaining the FP and conpane. They're internal tools of the LV editor -- private to the library that owns them -- so you cannot call them directly (why? Because I edit them from time to time and I don't want to be breaking customer apps when I do so). But there aren't any passwords in your way: you're free to make your own copy of the library and then change them from private to public. (You could just edit the copy that is there, but then your tools will be exposed to my whims in future versions. I don't change those VIs often anymore, but you never know when a significant LV2020 feature will come along that requires changes...)

 

All the functionality you are asking for should be there.

GregFreeman
Trusted Enthusiast

Thanks, very helpful for the time being. If I make modifications, is there a way to embed these into the right click menu? Would you recommend making it a quick drop plug-in? Looking for some direction on how to integrate it into the IDE

AristosQueue (NI)
NI Employee (retired)

A right-click plugin or quick drop plugin is just G code. You can call anything you need, even VIs outside of the plugins themselves. It's nice when the plugins can be a single VI or lone LLB, but if it has to pull down multiple files, that's fine... just zip them together and tell people where to put the unzip. In the case of right-click plugins, the plugin system ignores anything you put in subdirectories... it only cares about LLBs in the main directory. So it is easy to place support files there. I don't know details about QD plugins... check the documentation.

PNR
Member
Member

Good idea. A right-click plugin is a good alternative. You could also create a VI template for your particular type specifier that includes the boilerplate code and code comments to make it easier for your team to create matching SubVIs.