LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic control creation

Is it possible to dynamically create controls in LV 7?

Bill F
0 Kudos
Message 1 of 8
(3,931 Views)
Unfortunately no.

Sometimes using an array of the control e.g. or a multicolumn listbox and scaling it to show/hide new elements can be a workaround.

G Toolbox by George Zou allows dynamic creation of buttons though, you can find it at http://gtoolbox.yeah.net.
0 Kudos
Message 2 of 8
(3,931 Views)
YES!!!

The name of the VI is "Get Contorl From Type Descriptor.vi" [sic] and it is located at:

LabVIEW\project\_NewProbeWizard.llb\Get Contorl From Type Descriptor.vi

Cheers,

-Jim
0 Kudos
Message 3 of 8
(3,931 Views)
Yes, invent your own language and do everything in a string.

bfarley wrote:
> Is it possible to dynamically create controls in LV 7?
>
> Bill F
0 Kudos
Message 4 of 8
(3,931 Views)
My interpretation of dynamic control creation would be the ability to add a new control during run-time (if e.g. a file contains 4 graphs and I want one button to control the visibility of each graph the buttons can be created when needed, no need to know the maximum number of graphs and hard-code that number of buttons...(in this example an array would work fine yes, just the first that came to mind).

Looking at the VI mentioned I believe that is still not possible...or?

It would be great if I'm wrong:-) ...
0 Kudos
Message 5 of 8
(3,931 Views)
No, it can only target idle VIs 😞

However, I have seen a tool by Jean-Pierre Drolet, that dynamically "creates" controls by drawing them on a Picture Control and then uses some creative tricks for allowing user interaction.
0 Kudos
Message 6 of 8
(3,931 Views)
I have used this technique in a number of applications.

LV 6.1's events make this a rather straight forward approach. You do a little math in the mouse clicks and what is visable and you can then overlay the image with a spare of the same control you store "off screen".

I must confess there is one gotcha in this approach. They look so much like normal LV controls you try to double click on them to find them in the diagram!

Ben

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 8
(3,931 Views)
Hi,

If you make one VI that has the control, and make it a .vit iso .vi, it
would look the same as a probe (make it a floater). You can open the vit
dynamically, and because it is a vit, you can open it several times.

Regards,

Wiebe.

"Mads" wrote in message
news:5065000000050000002E430100-1068850981000@exchange.ni.com...
> My interpretation of dynamic control creation would be the ability to
> add a new control during run-time (if e.g. a file contains 4 graphs
> and I want one button to control the visibility of each graph the
> buttons can be created when needed, no need to know the maximum number
> of graphs and hard-code that number of buttons...(in this example an
> array would work fine yes, just the first that came to mind
).
>
> Looking at the VI mentioned I believe that is still not possible...or?
>
> It would be great if I'm wrong:-) ...
0 Kudos
Message 8 of 8
(3,931 Views)