## SelectMembers

### Introduced

v1.0

### Description

Selects the members of groups.
Note: If the SelectionList argument contains an error, the command fails.

### Scripting Syntax

    oReturn = SelectMembers( [SelectionList], [AffectSelectionList], [CheckObjectSelectability] );

### Return Value

If SelectFlag is False, returns XSICollection containing the members.

### Parameters

Parameter | Type | Description
--- | --- | ---
SelectionList | String | List of groups. Default Value: Current selection
AffectSelectionList | Boolean | True to select objects, False to return a list of objects. Default Value: True
CheckObjectSelectability | Boolean | Specifies whether to select objects that marked as unselectable. Default Value: False
Possible Values: | Description:
False | Select objects even if they are marked as unselectable.
True | Do not select objects if they are marked as unselectable.

### Examples

#### VBScript Example

    ' The following creates a first group with a cone and a cylinder

    ' and a second group with a sphere and a torus

    ' Then we use SelectMembers to select the members of the first group.

    ' Then we use SelectMembers to get the members of the second group,

    ' then display their name without selecting them.

    NewScene

    CreatePrim "Cone", "MeshSurface"

    CreatePrim "Cylinder", "MeshSurface"

    Translate , 6.53800806588704, 0.470281530755438, -4.70281530755438E-02, _

    		siRelative, siView, siObj, siXYZ, , , siXYZ

    AddToSelection "cone,cylinder", , True

    CreateGroup

    CreatePrim "Sphere", "MeshSurface"

    Translate , -11.6949439857416, -2.78124277037914, -2.24299813358391, _

    		siRelative, siView, siObj, siXYZ

    CreatePrim "Torus", "MeshSurface"

    Translate , -5.04010305375909, -6.50115497576114, 2.00167060127099, _

    		siRelative, siView, siObj, siXYZ

    AddToSelection "sphere", , True

    CreateGroup

    DeselectAll

    SelectObj "Group"

    SelectMembers , True

    logMessage "cone and cylinder (members of the first group)"

    logMessage "should be selected now"

    set members = SelectMembers( "Group1", False )

    logMessage "Group1 members are: " & members

    ' The output of the previous logMessage should be

    ' INFO : Group1 members are: "torus,sphere"