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

Traverse for GObjects VI

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Owning Palette: VI Scripting VI and Functions

Requires: VI Scripting

Searches a target for objects of a particular type and returns an array of references to those objects. The target can be a front panel, a block diagram, or any object that can contain other objects, such as a For Loop, a cluster, or a user-defined control. This VI also recursively finds objects nested within other container objects.

Details  Example

Other Refnum is a reference to the container object you want to search if you specify the Traverse Target as Other. LabVIEW ignores this input if Traverse Target is either FP or BD.
Traverse Target indicates the type of container object that you want to traverse. The following table contains the possible values for this input:

0FP—Front panel
1BD—Block diagram
2Other—Container objects other than the front panel or block diagram. These include structure diagrams and clusters.
VI Refnum is the reference to the VI you want to traverse. LabVIEW uses this input when Traverse Target is either FP or BD. LabVIEW ignores this input if you wire a reference to a specific container object to Other Refnum.
Class Name is the VI Server class name of the object for which you are searching.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
Traverse Generated Code specifies whether to traverse code that LabVIEW generates in the process of implementing certain functions. The default is FALSE.
dup VI Refnum returns VI Refnum unchanged.
References is an array of GObject references to the objects this VI finds. Use the To More Specific Class function to downcast each reference if necessary.
# of Refs is the number of references in the References array.
error out contains error information. This output provides standard error out functionality.

Traverse for GObjects Details

To use this VI, specify a Traverse Target of BD for block diagram or FP for front panel and the Class Name of the object you want to find. To traverse a specific container object instead of a front panel or block diagram, specify the target as Other and wire a reference to the specific object to the Other Refnum input.


Refer to the Using Traverse VI in the labview\examples\Application Control\VI Scripting\Finding and Modifying Objects directory for an example of using the Traverse for GObjects VI.


 Was this document helpful?  submit
  Helpful Not Helpful