LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is LabVIEW able to create ActiveX Object for other sw to use?

I would like to create some ActiveX object from LabVIEW that VB could use it. How do I do it? I only find info about labVIEW use ActiveX created by other SW. Please let me know if LabVIEW has such ability. Thanks.
0 Kudos
Message 1 of 2
(2,610 Views)
You cannot create a new kind of ActiveX object in LabVIEW, but you can use ActiveX to control LabVIEW (or a LabVIEW-built EXE) and run your VIs programmatically from other development environments.

Below is a modified excerpt from an example provided by NI on running a LabVIEW VI from Visual Basic:

'--------------------
Dim lvapp As Object
Dim vi As Object
Dim paramNames(4), paramVals(4)

Set lvapp = CreateObject("LabVIEW.Application")
viPath = lvapp.AppDir + "\examples\apps\freqresp.llb\Frequency Response.vi"
Set vi = lvapp.GetVIReference(viPath)
vi.FPWinOpen = True

paramNames(0) = "Amplitude"
paramNames(1) = "Number of Steps"
paramNames(2) = "Low Frequency"
paramNames(
3) = "High Frequency"
paramNames(4) = "Response Graph"

paramVals(0) = cwnAmplitude
paramVals(1) = cwnNumSteps
paramVals(2) = cwnLowFreq
paramVals(3) = cwnHighFreq
' paramVals(4) will contain the value of Response Graph after running the vi.

Call vi.Call(paramNames, paramVals)
'--------------------
Message 2 of 2
(2,610 Views)