Public Member Functions
SchematicNode Class Reference

Detailed Description

The SchematicNode class represents a UI node as displayed in a Schematic view.

See also:
10.0 (2012)
Demonstrates how to access all nodes in a Schematic view object.
        using namespace XSI;
        void LogNode( SchematicNode& in_node );
        Application app;
        // Get a schematic view
        Layout layout = app.GetDesktop().GetActiveLayout();
        XSI::Schematic schematic = layout.FindView( "MySchematic" );
        if ( !schematic.IsValid() )
            app.GetDesktop().GetActiveLayout().CreateView( "Schematic", "MySchematic", schematic );
        // Log the top level nodes
        CRefArray nodes = schematic.GetNodes();
        for (ULONG i=0; i<nodes.GetCount(); i++)
            SchematicNode node = nodes[0];
            LogNode( node );
        void LogNode( SchematicNode& node )
            LONG x,y,w,h;
            node.GetUIInfo( x,y,w,h );

            Application app;
            app.LogMessage( "*******************************************************************" );
            app.LogMessage( "Name: " + node.GetName() );
            app.LogMessage( "X=" + CString(x) );
            app.LogMessage( "Y=" + CString(y) );
            app.LogMessage( "W=" + CString(w) );
            app.LogMessage( "H=" + CString(h) );
            app.LogMessage( "Expanded=" + CString(node.IsExpanded()) );
            app.LogMessage( "Selected=" + CString(node.IsSelected()) );
            app.LogMessage( "Node count=" + CString(node.GetNodes().GetCount()) );
            app.LogMessage( "Parent object=" + SIObject(node.GetParent()).GetFullName() );
            app.LogMessage( "Underlying object=" + CString( SIObject(node.GetObject()).GetFullName()) );            
            CRefArray nodes = node.GetNodes();
            for ( LONG i=0; i<nodes.GetCount(); i++ )
                SchematicNode node = nodes[i];
                LogNode( node );

#include <xsi_schematicnode.h>

Inheritance diagram for SchematicNode:
Inheritance graph

List of all members.

Public Member Functions

  SchematicNode ()
  ~SchematicNode ()
  SchematicNode (const CRef &in_ref)
  SchematicNode (const SchematicNode &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
SchematicNode operator= (const SchematicNode &in_obj)
SchematicNode operator= (const CRef &in_ref)
bool  IsExpanded () const
CStatus  PutExpanded (bool in_bState)
siBranchFlag  IsSelected () const
CStatus  Move (LONG in_x, LONG in_y)
CRefArray  GetNodes () const
CRef  GetObject () const
CStatus  GetUIInfo (LONG &out_x, LONG &out_y, LONG &out_w, LONG &out_h) const

Constructor & Destructor Documentation

Default constructor.

Default destructor.

SchematicNode ( const CRef in_ref )


in_ref constant reference object.
SchematicNode ( const SchematicNode in_obj )

Copy constructor.

in_obj constant class object.

Member Function Documentation

bool IsA ( siClassID  in_ClassID ) const [virtual]

Returns true if a given class type is compatible with this API class.

in_ClassID class type.
true if the class is compatible, false otherwise.

Reimplemented from UIObject.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

The class type.

Reimplemented from UIObject.

SchematicNode& operator= ( const SchematicNode in_obj )

Creates an object from another object. The newly created object is set to empty if the input object is not compatible.

in_obj constant class object.
The new SchematicNode object.
SchematicNode& operator= ( const CRef in_ref )

Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.

in_ref constant class object.
The new SchematicNode object.

Reimplemented from UIObject.

bool IsExpanded ( ) const

Determine if the node is expanded or not. Children nodes are set as expanded if their parent are also expanded.

True if expanded, false otherwise.
CStatus PutExpanded ( bool  in_bState )

Set the node as expanded or collapsed.

in_bState true to expand or false to collapse the node.
siBranchFlag IsSelected ( ) const

Determine if the node is selected (node or branch).

Branch flag: siNode (node selected), siBranch (branch selected), siNotSelected (node is not selected). Children nodes are also set as branch selected when the top parent is branch selected.
CStatus Move ( LONG  in_x,
LONG  in_y 

Set the x and y position of the node. The position is in screen coordinates and is relative to the node's schematic view.

in_x Position in x.
in_y Position in y.
CStatus::Ok Success
CRefArray GetNodes ( ) const

Returns the children nodes of this Schematic node as an array of SchematicNode objects. Only visible nodes are returned.

Array of SchematicNode objects.
CRef GetObject ( ) const

Returns the node's underlying Softimage object.

Softimage object.
CStatus GetUIInfo ( LONG &  out_x,
LONG &  out_y,
LONG &  out_w,
LONG &  out_h 
) const

Returns the 2D coordinates and size of the node. Cooordinate units are in screen coordinates and relative to the node's schematic view.

out_x Position in x.
out_y Position in y.
out_w Width.
out_h Height.
CStatus::Ok Success

The documentation for this class was generated from the following file: