## Group.IsMember

### Introduced

v5.0

### Description

Checks if an object is a member of the group.
For large numbers of objects, it's better to use SIObject.IsEqualTo on each member (and ProjectItem.BranchFlag, if you want to know if the object is a branch member).

### C# Syntax

    Boolean Group.IsMember( Object in_member, Boolean in_branchmember );

### Scripting Syntax

    oBoolean = Group.IsMember( Member, [BranchMember] );

### Return Value

Boolean
True if the object is a member, and False otherwise.

### Parameters

Parameter | Type | Description
--- | --- | ---
Member | SceneItem | The object to check.
BranchMember | Boolean | True to test if the object is a branch member. Default Value: False

### Examples

#### JScript Example

    // This example shows how to test a group for branch members.
    NewScene(null, false );
    var a = ActiveSceneRoot.AddGeometry( "Cube", "MeshSurface", "A");
    a.length.value = 2;
    var b = a.AddGeometry("Cube", "MeshSurface", "B");
    b.length.value = 2;
    Translate( b, 5 );
    var c = b.AddGeometry("Cube", "MeshSurface", "C");
    c.length.value = 2;
    Translate( c, 5 );
    // Create a group
    var group = ActiveSceneRoot.AddGroup();
    // Add members to the group
    group.AddMember( a, true );
    group.AddMember( b, false );
    selection.clear();
    selection.add(a);
    selection.add(b);
    var eSelection = new Enumerator(selection);
    // Check if the selected object is a group member.
    for ( ; !eSelection.atEnd(); eSelection.moveNext() )
    {
            var obj = eSelection.item();
            if ( group.IsMember( obj, false ) )
                    logmessage( "selected object '"+ obj.name +"' is a group member");
            if ( group.IsMember( obj, true ) )
                    logmessage( "selected object '"+ obj.name +"' is a branch group member");
    }
    //INFO : selected object 'A' is a group member
    //INFO : selected object 'A' is a branch group member
    //INFO : selected object 'B' is a group member

### See Also

Group.IsMember Group.Members