Self

(Engine-Level Function)

Description: Returns the object value of the current object.
Returns: Object Value
Function Groups: Basic Module
Usage: Script or steady state.
Related to: NParm | Parameter | PType | ResetParm | Return | SystemSelf
Format: Self( )
Parameters:

None

Comments:

This is the only way to get a module's object value, and is a way for an object to store a reference to itself.

Often this object value is passed to other objects so they can :
- Scope into that object to access its member variables / modules.
- Monitor the object's lifetime (wait for the object value to no longer be Valid).

Note: If writing an expression that must reference the object's parent, \Root is more reliable than ParentObject(Self).

Example:

  ModPtr = Scope(Self, DriverTag);

Where DriverTag is a text variable containing the relative name of another tag.