## X3DObject.RemoveFromParent

### Description

Cuts the hierarchy link of this child object with its parent. The object is automatically moved under the X3DObject scene root. This operation has no effect on child objects of the scene root.

### C# Syntax

    X3DObject.RemoveFromParent();

### Scripting Syntax

    X3DObject.RemoveFromParent();

### Examples

#### VBScript Example

    NewScene , false

    set oRoot = Application.ActiveProject.ActiveScene.Root

    set oSphere = oRoot.AddGeometry( "Sphere", "NurbsSurface" )

    set oCube = oRoot.AddGeometry( "Cube", "NurbsSurface" )

    for each oChild in oRoot.Children

    	Application.LogMessage oChild.Name

    next

    Application.LogMessage "Remove"

    oSphere.RemoveFromParent

    for each oChild in oRoot.Children

    	Application.LogMessage oChild.Name

    next

    ' Expected results:

    'INFO : Camera_Root

    'INFO : light

    'INFO : sphere

    'INFO : cube

    'INFO : Remove

    'INFO : Camera_Root

    'INFO : light

    'INFO : cube

    'INFO : sphere