Table Of Contents

Class Property (G Dataflow)

Version:
Last Modified: April 27, 2020

Provides read and write access to the fields and properties of a class.

connector_pane_image
datatype_icon

G object in

Class object you want to access the fields and properties for.

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

G object out

The class object.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.
datatype_icon

(property)

The property of the class object that you want to read or write.

By default, this property is configured to read. To write this property, right-click the property and select Change to Read/Write from the shortcut menu.

To access more properties, resize the node.

Access Scope

Class fields are always private, so only property nodes in methods belonging to the class can access fields of the class. Property read and write accessors, which you configure within the class document, each have a scope setting. If a property has a public read accessor and a private write accessor, property nodes in any VI or CDL that has access to the class has access to the read operation while the write operation is available only in methods of the class that defines the property.

Conditional Error Terminals

A property node has error terminals if it accesses only properties or a mix of properties and fields. A property node that accesses only fields does not have error terminals.

Runtime Error Behavior

Errors cascade through property items in a property node in order. If the first property access produces an error, that error passes into the property accessor for the second property. The G code in the second property accessor determines how the error is handled. Runtime errors that propagate to field access cause the field access not to execute. If a field read receives a runtime error, it does not read the data out of the class and instead returns the default value for the field data type.

Where This Node Can Run:

Desktop OS: Windows

FPGA: All devices

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics