'
' This example checks to see if an object really has a parent
'
set oSphere = ActiveProject.ActiveScene.Root.AddGeometry("Sphere", "NurbsSurface")
Compare oSphere
set oApp = Application
Compare oApp
'------------------------------------------------------------------------------
' NAME: Compare
'
' INPUT:
'
' DESCRIPTION: Logs if the object has a parent or not.
'------------------------------------------------------------------------------
sub Compare (in_obj)
if in_obj.IsEqualTo(in_obj.Parent) then
LogMessage "The parent is the object itself"
else
LogMessage "The object has a parent. "
end if
end sub |