Jump to content


Photo
- - - - -

Tool to Import an ActiveX Library


  • Please log in to reply
3 replies to this topic

#1 lvb

lvb

    Very Active

  • Premium Member
  • 159 posts
  • Location:Michigan
  • Version:LabVIEW 2012
  • Since:2003

Posted 10 July 2012 - 06:05 PM

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)?

Brian

Certified LabVIEW Architect (CLA)

Certified TestStand Developer (CTD)


#2 asbo

asbo

    I have no idea what you're talking about... so:

  • V I Engineering, Inc.
  • 1,273 posts
  • Version:LabVIEW 2011
  • Since:2008

Posted 10 July 2012 - 09:05 PM

I don't, but if you felt like writing some scripting... :thumbup1:

#3 Yair

Yair

    Extwemely Active

  • Members
  • PipPipPipPipPipPip
  • 2,644 posts
  • Version:LabVIEW 2009
  • Since:2003

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.

#4 lvb

lvb

    Very Active

  • Premium Member
  • 159 posts
  • Location:Michigan
  • Version:LabVIEW 2012
  • Since:2003

Posted 11 July 2012 - 01:23 PM

I have already jumped into scripting this tool. :book:

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.

Select Object from Type Library Dialog.jpg

Edited by brianafischer, 11 July 2012 - 02:12 PM.

Brian

Certified LabVIEW Architect (CLA)

Certified TestStand Developer (CTD)