Using Static .NET Properties and Methods
- Updated2025-04-01
- 1 minute(s) read
Using Static .NET Properties and Methods
LabVIEW supports static .NET properties and methods. You can execute static properties and methods on classes without wiring a .NET object reference to the Property Node or Invoke Node.
Note Creating and communicating
with.NET Framework 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.
Complete the following steps to use static properties and methods with a .NET object.
- Add one of the following nodes to the block diagram:
- Right-click the node and select either Select Class».NET Core»Browse or Select Class».NET Framework»Browse from the shortcut menu to display the Select Object From Assembly dialog box.
- Select a class from the Assembly pull-down menu.
- Select an object from the Objects listbox.
- Click the OK button.
- Right-click the Property Node or Invoke Node and select a static property or method from the shortcut menu. LabVIEW indicates static properties and methods with a [S] at the beginning of the property or method name.
Note If you resize the Property Node to
include more properties, and some of those properties are not static properties, you must
wire a .NET server reference to the Property Node by using a Constructor Node to create a .NET
object.