Skip to the content.

Reusing .NET Interop Assembly (DLL) with LVOOP in LabVIEW

License: MIT DOI

Keywords

LabVIEW, LabVIEW Classes, LVOOP, OOP
DLL, .NET, Constructor

Published as Example to NI Forums and described in more detail at Reusing .NET Interop Assembly with LVOOP in LabVIEW - Example Code in NI’s Community.

Project Overview

Project Overview

Snippets

Test Read - LabVIEW Classes, LVOOP

Test Read - LabVIEW Classes, LVOOP
Test Read - LabVIEW Classes, LVOOP

Test Read - Interop Assembly (.NET DLL), LVOOP

Test Read - LabVIEW Classes, LVOOP

Testing constructors

ConstructorNewBD SelectOtherConstructorBD SelectOtherConstructor ConstructorPtrBD
An alternative to the constructor that uses pointers is creating and exporting a VI that provides a valid, non-initialized class reference which will be initialized in the Create.vi.
This proved very useful in a situations where you cannot use the .NET FormatterServices GetUninitializedObject Method of mscorlib.dll to instantiate a new object without calling its constructors.
NoConstructorGetRefBD

Note: For more on the constructor node issue in VS see ‘new’ triggers browsing to lvclass file on disk

Download

Download the latest release here.