Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Using Static .NET Properties and Methods

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

LabVIEW supports static .NET properties and methods. You can execute static properties and methods on classes without wiring a .NET server refnum to the Property Node or Invoke Node.

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.

Complete the following steps to use static properties and methods with a .NET object.

  1. Add one of the following nodes to the block diagram:
  2. Right-click the node and select Select Class».NET»Browse from the shortcut menu to display the Select Object From Assembly dialog box.
  3. Select a class from the Assembly pull-down menu.
  4. Select an object from the Objects listbox.
  5. Click the OK button.
  6. 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.

 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit