From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling LabVIEW vi through ActiveX (from VB)

Hello,

I have an existing VB application from which I try to call a LabVIEW VI.
There is a nice example in the Comm directory in the LabVIEW examples. I
played with it and everything seemed to work fine. I tryed to redo this
between my own VB application and my own LV vi, but apparently there is a
problem of passing the parameter, I get the message (in VB) there is a
problem on the connector pane. I double-checked spelling, no result. Does
somebody have suggestions where to look for possible errors? (everything
seems to be straight forward)

Second question : can you only call a vi, or can I also build a .exe and
call it with VB, being able to pass parameters?


Thanks
0 Kudos
Message 1 of 2
(2,314 Views)
When you call a VI via ActiveX, the controls names in the paramnames array list must be on the connector pane, e.g. they are inputs controls that you can wire from a diagram. Also, all inputs that are set "required" on the connector must be set in the paramnames array. Failing to do that will generate connector panes errors.

A built application can also be an ActiveX server. In the application builder settings, check the box to activate the ActiveX server and give it a name, say "myapp". Do not use "labview" of course... In VB you create an reference to your built app using CreateObject("myapp.application")


LabVIEW, C'est LabVIEW

0 Kudos
Message 2 of 2
(2,314 Views)