LabVIEW Idea Exchange

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

programmatically create and delete controls dynamically at run time (G Type?)

Status: New

in LabVIEW NXG we have G Types Control which allow us to create and delete controls dynamically at run time.

Creating Controls Dynamically on a Panel - LabVIEW NXG 5.1 Manual - National Instruments 

 

Since LabVIEW NXG is deprecated (no further development) and announced that: the strengths of the NXG platform will be integrated into LabVIEW 2021(+),

 

Will that possible for us to have such G Type feature in LabVIEW? when probably?

5 Comments
wiebe@CARYA
Knight of NI

All you'd need is a reference to the new control. I don't think a new type is required. 

 

Not sure how this isn't a duplicate (I can't find one). This has been high on everybody's list forever.

ThamS
Member

I absolutely agree with you, 

 


wrote:

Not sure how this isn't a duplicate (I can't find one). This has been high on everybody's list forever.

 

Please let me know the link of any of previous similar idea. I would participate in providing kudos for sure.

 

wiebe@CARYA
Knight of NI

>Some of them told me to use VI script, however unfortunately it doesn't work during run time.

 

(Recursive) Subpanels can make this work to some extend. It's a pain though.

TenJigoku77
Member

Hi !
I agree with you all. Here I am wishing for implementing this NXG's feature into LabVIEW because I cannot create hundreds of controls manually and manage their visibility for each of them...
A lot of means (subpanel, VI script or user32.dll) to avoid this problems but none to really solve it.
Please consider adding this feature for the future LabVIEW versions.
 

wiebe@CARYA
Knight of NI

>because I cannot create hundreds of controls manually and manage their visibility for each of them...

 

Why not? 

 

You can create thousands of subpanels on a front panel. Managing them isn't that hard (, and with dynamic controls you'd also need some management). It's just an array with VI refs, positions, visibility. You can do this in a dedicated VI, to make a reusable module.

 

It is however:

1) sad that we still have to do that and

2) VI server can be sloooow. Ironically, especially closing VI references is slow, and eventually needs to happen.

 

This is the idea exchange, but if you post a link to somewhere, I'd be happy to help with that.