'---------------------------------------------------------
' This example demonstrates how to use the CreateModel
' command.
'---------------------------------------------------------
NewScene , false
' First create a node off of the scene root.
dim Root_NodeObj
CreateModel , "Root_Node", , Root_NodeObj
Application.LogMessage "Created " & Root_NodeObj
DeselectAll
' Now create a sub-node, and make it the child of a new node. Notice that since
' "Sub-node" is selected when "Another_Root" is created, it becomes a child.
dim Sub_NodeObj, Another_RootObj
CreateModel , "Sub-node", , Sub_NodeObj
Application.LogMessage "Created " & Sub_NodeObj
SelectObj "Sub-node"
CreateModel , "Another_Root", , Another_RootObj
Application.LogMessage "Created " & Another_RootObj
DeselectAll
' Now make another node, with parent "Another_Root", and child "Root_Node".
' Notice that now, "Another_Root" is the only top-level model, with children
' "Mid_Root" and "Sub-node", and "Mid_Root" has child "Root_Node"
dim Mid_RootObj
CreateModel "Root_Node", "Mid_Root", "Another_Root", Mid_RootObj
Application.LogMessage "Created " & Mid_RootObj
DeselectAll
'---------------------------------------------------------
' Output from this script:
'---------------------------------------------------------
'INFO : Created Root_Node
'INFO : Created Sub-node
'INFO : Created Another_Root
'INFO : Created Mid_Root |