.NET Functions

LabVIEW 2018 Help

Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)

LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help
LabVIEW 2020 Help

Owning Palette: Connectivity VIs and Functions

Requires: Base Development System. This topic might not match its corresponding palette in LabVIEW depending on your operating system, licensed product(s), and target.

Use the .NET functions to create .NET objects, set properties or call methods on those objects, and handle events for those objects in the .NET environment. You also can create a .NET control on the front panel.

Note  Creating and communicating with .NET objects in LabVIEW requires the .NET CLR 4.0 that installs with LabVIEW. You must use a .NET 2.0 configuration file if you want to load .NET 2.0 mixed-mode assemblies. Refer to the requirements for using .NET with LabVIEW for more information about .NET restrictions in LabVIEW.

National Instruments strongly recommends that you use .NET objects only in LabVIEW projects.

The functions on this palette can return Windows connectivity error codes.

Refer to the labview\examples\Connectivity\Dot NET directory for examples using the .NET functions.

Palette ObjectDescription
.NET Object To VariantConverts a .NET object to a LabVIEW variant.
Close ReferenceCloses a refnum associated with an open VI, VI object, an open application instance, or a .NET or ActiveX object.
Constructor NodeCreates an instance of a .NET object. This node identifies the constructor from which to create a .NET object.
Invoke Node (.NET)Invokes a method or action on a reference. Most methods have associated parameters.
Property Node (.NET)Gets (reads) and/or sets (writes) properties of a reference.
Register Event CallbackRegisters a VI to be called when an event occurs. You use this function to register and handle .NET and ActiveX events. LabVIEW uses the type of the input reference wired to each item to determine the events for which you can register.
Static VI ReferenceMaintains a static reference to a VI. You can configure the Static VI Reference function to output a generic or strictly typed VI reference. After you place the Static VI Reference function on a block diagram, double-click the function to display a file dialog box where you can select a VI.
To .NET ObjectConverts a LabVIEW data type to a .NET object. You can convert numeric (except extended precision and complex), string, Boolean, timestamp, path, .NET refnum, and array data types.
To More Generic ClassTypecasts a reference, such as a control or a type definition, to a more generic class in the inheritance hierarchy.
To More Specific ClassTypecasts a reference, such as a control or a type definition, to a more specific class in the inheritance hierarchy.
Unregister For EventsUnregisters all events associated with an event registration refnum.


Not Helpful