## SelectConstrainedObjects

### Introduced

v3.0

### Description

Resets the Selection to contain any objects that are constrained to the specified or selected object.

### Scripting Syntax

    SelectConstrainedObjects( [ConstrainingObj] );

### Parameters

Parameter | Type | Description
--- | --- | ---
ConstrainingObj | String or X3DObject | Object which is constraining other objects Default Value: Current selection

### Examples

#### JScript Example

    /*
            This example demonstrates the SelectConstrainingObjects and
            SelectConstrainedObjects commands.
    */
    NewScene( null, false ) ;
    var oRoot0 = Create2DSkeleton( 0, -0.2, 3.0, 0, 2, 0.2, 0, 90, 0, 4 );
    var oRoot1 = Create2DSkeleton( 0, -1, 2.0, 0, 4, 0.1, 0, 90, 0, 4 ) ;
    var oCube = ActiveSceneRoot.AddGeometry( "Cube", "MeshSurface" ) ;
    // Constrain both skeletons to the cube
    ApplyCns( "Position",oRoot0.Effector, oCube ) ;
    ApplyCns( "Position",oRoot1.Effector, oCube ) ;
    // Give the constrained object, select its constrainer
    SelectConstrainingObjects( oRoot1.Effector )
    // Expect "cube"
    Logmessage( Selection.GetAsText() ) ;
    // Give the Constrainer select the constrained objects
    SelectConstrainedObjects( oCube ) ;
    // Expect "eff1,eff"
    LogMessage( Selection.GetAsText() ) ;

### See Also

Constraint Kinematics.Constraints ApplyCns GetConstrainedObjects SelectConstrainingObjects