I would like to wrap an ActiveX interface in a LabVIEW class. This process is pretty tedious. Does anyone know of a tool similar to the "Import Shared Library" that would work for an ActiveX class (*.tlb; *.olb; *.ocx; *.dll)?
Tool to Import an ActiveX Library
Started by
lvb
, Jul 10 2012 06:05 PM
3 replies to this topic
#1
Posted 10 July 2012 - 06:05 PM
Brian Fischer
Certified LabVIEW Architect (CLA)
Certified TestStand Developer (CTD)
#2
Posted 10 July 2012 - 09:05 PM
I don't, but if you felt like writing some scripting...
#3
Posted 11 July 2012 - 09:07 AM
No tool, but the code for it should be pretty easy. I personally don't see the need, but I did post a basic example here which does this with .NET. The same thing should presumably apply to ActiveX code.
One thing you might want to do is create a template of the class VI and use that as a basis for each VI. This will save you having to script all the code which stays the same.
One thing you might want to do is create a template of the class VI and use that as a basis for each VI. This will save you having to script all the code which stays the same.
#4
Posted 11 July 2012 - 01:23 PM
I have already jumped into scripting this tool. 
Wrapping the properties and methods should be easy. However, any suggestions on how to script the selection of a Type Library? It would be nice if the native Select Object From Type Library dialog could be launched, but I don't see much in scripting related to ActiveX and Automation Open functions.
I found this related post on LAVA, but it does not create the ActiveX ref. It creates an array of I16.
Wrapping the properties and methods should be easy. However, any suggestions on how to script the selection of a Type Library? It would be nice if the native Select Object From Type Library dialog could be launched, but I don't see much in scripting related to ActiveX and Automation Open functions.
I found this related post on LAVA, but it does not create the ActiveX ref. It creates an array of I16.
Edited by brianafischer, 11 July 2012 - 02:12 PM.
Brian Fischer
Certified LabVIEW Architect (CLA)
Certified TestStand Developer (CTD)












