LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make my ActiveX Control behave like a LabVIEW native control?

Highlighted
When a user drops my ActiveX control onto a Front Panel and then views the Diagram, I would like him to see a terminal outputting a specific property value instead of the reference number. In short, I don't want him to have to go to the extra step of creating a Property Node to access the property value.
0 Kudos
Message 1 of 3
(982 Views)
Highlighted
This is the best I can think of... Make a VI with your ActiveX control on the front panel. On the diagram, wire up a property node and select whatever you want to be available. Save the VI in the user.lib folder. Edit your CONTROLs palette and add the VI as a CONTROL. When you drop the VI-Control on the front panel, the property node will appear on the diagram already wired up! You can even use a subVI instead of the property node to make it look "cooler". A little known LabVIEW feature!

If you drop a 3D graph, you'll see exactly this technique used by NI.

Dan Press
www.primetest.com
0 Kudos
Message 2 of 3
(982 Views)
Highlighted
> When a user drops my ActiveX control onto a Front Panel and then views
> the Diagram, I would like him to see a terminal outputting a specific
> property value instead of the reference number. In short, I don't want
> him to have to go to the extra step of creating a Property Node to
> access the property value.

You can make it drop a prewired property node when they drop the control.
It isn't hard, but there are a few steps involved.

To do this, make a VI that has your control configured the way you want,
and on the diagram have it wired to a property node with the correct
selection and direction. You should also make an icon that will show
up in the palette. Save this VI somewhere like user.lib. Now
you need to edit the palettes and add this as a Merge VI.


Open the Controls palette and click on the ... button. If using LV5,
choose Edit Controls and Functions Palette from the Edit menu.

Once editing the palettes, make your own palette set and give it a name.
Now choose a place in the palettes to add the .vi file. Right click and
Insert and Custom Control(s)... This will bring up a file dialog that
is filtering for .ctl files. Change the filter to allow all files.
Select the .vi file that you saved earlier.

To give this to others, you may want to make this a bit differently.
You can place the VI and .mnu file into user.lib and a few other places
and it will automatically be added to the LV palettes.

Anyway, once the VI is available in the palettes, it will merge the VI
contents into the VI, exactly as the 3D graph does.

Greg McKaskle
0 Kudos
Message 3 of 3
(982 Views)