SchematicNode.Nodes

Introduced

v10.0 (2012)

Description

Returns the immediate children nodes of this Schematic node as a SchematicNodeCollection object. Only visible nodes displayed in the schematic view are returned. This method must be used recursively to access all children in the node branch.

C# Syntax

// get accessor
SchematicNodeCollection rtn = SchematicNode.Nodes;

Examples

Python Example

#
# Script to demonstrate how to access a SchematicNode object and reads its UI position.
#
# import some Softimage python shortcuts
from siutils import *
def log_node_info( node, spc='' ):
	(x,y,w,h) = node.UIInfo
	log( '%sname=%s x=%d y=%d w=%d h=%d parent=%s object=%s selected=%d expanded=%d' % (spc,node.Name,x,y,w,h,node.Parent,node.Object,node.Selected,node.Expanded) )
def log_node( i, node ):
	spc = i*'..'
	(x,y,w,h) = node.UIInfo	
	log_node_info( node, spc=spc )
	for n in node.Nodes:
		log_node(i+1, n )
# Get the 'MySchematic' schematic view object in the current layout
viewname = 'MySchematic'
activelayout = si().Desktop.ActiveLayout
v = activelayout.Views( viewname )
# 'MySchematic' view is not created yet
if v == None:
	log('Creating new schematic...: %s' % (viewname))
	v = activelayout.CreateView( "Schematic", viewname )
# Python needs to convert from View to Schematic object
sv = disp(v)
# Log all nodes in the view
indent = 0
for node in sv.Nodes:
	log_node( indent, node )