Public Member Functions
Schematic Class Reference

Detailed Description

The Schematic class represents the Schematic UI view and gives access to SchematicNode objects.

See also:
SchematicNode
Since:
10.0 (2012)
Example:
Demonstrates how to access a specific Schematic view object. The example creates a new view if it doesn't already exist in the active layout.
        using namespace XSI;
                
        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[i];
            
            LONG x,y,w,h;
            node.GetUIInfo( x,y,w,h );

            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()) );            
        }           

#include <xsi_schematic.h>

Inheritance diagram for Schematic:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  Schematic ()
  ~Schematic ()
  Schematic (const CRef &in_ref)
  Schematic (const Schematic &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
Schematic operator= (const Schematic &in_obj)
Schematic operator= (const CRef &in_ref)
SchematicNode  FindNode (const CRef &in_pObject)
CRefArray  GetNodes () const
CRefArray  GetSelectedNodes () const

Constructor & Destructor Documentation

Schematic ( )

Default constructor.

~Schematic ( )

Default destructor.

Schematic ( const CRef in_ref )

Constructor.

Parameters:
in_ref constant reference object.
Schematic ( const Schematic in_obj )

Copy constructor.

Parameters:
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.

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

Reimplemented from View.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from View.

Schematic& operator= ( const Schematic in_obj )

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

Parameters:
in_obj constant class object.
Returns:
The new Schematic object.
Schematic& 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.

Parameters:
in_ref constant class object.
Returns:
The new Schematic object.

Reimplemented from View.

SchematicNode FindNode ( const CRef in_pObject )

Returns the Schematic node representation of a Softimage object.

Parameters:
in_pObject Softimage object.
Returns:
SchematicNode object
CRefArray GetNodes ( ) const

Returns an array of SchematicNode objects representing the top level nodes displayed in the view. The array contains only the visible objects in the view. For instance, the scene root object is not visible in a schematic view and is not accessible as a top level node.

Returns:
Array of SchematicNode objects.
CRefArray GetSelectedNodes ( ) const

Returns an array of SchematicNode objects representing the selected nodes displayed in the view.

Returns:
Array of SchematicNode objects.

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