Verifies that an object is a member of a specified group.
Rhino.IsObjectInGroup (strObject [, strGroup])
strObject |
Required. String. The identifier of an object. |
strGroup |
Optional. String. The name of a group. If omitted, the function verifies that the object is a member of any group. |
True |
The object is a member of the specified group. If a group was not specified, the object is a member of some group. |
False |
The object is not a member of the specified group. If a group was not specified, the object is not a member of any group. |
Null |
On error. |
Dim strObject, strGroup, blnResult
blnResult = False
strObject = Rhino.GetObject("Select object")
If Not IsNull(strObject) Then
strGroup = Rhino.GetString("Group name")
If Not IsNull(strGroup) Then
blnResult = Rhino.IsObjectInGroup(strObject, strGroup)
If blnResult = True Then
Rhino.Print "The object belongs to the group."
Else
Rhino.Print "The object does not belong to the group."
End If
End If
End If