Compares this object with a specified object and indicates whether they are the same object or not, this excludes the the path to to the object. The same shared object will return true if access from different parents. For example, a material from the material library and one accessed from the actual object. To check the uniqueness of the path use the SIObject.FullName property.
SIObject.IsEqualTo( Target ); |
Parameter | Type | Description |
---|---|---|
Target | SIObject | The object to compare with |
' ' 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 |