SelectedObjectGrips

Returns a list of grip indices identifying an object's selected grips.

Syntax

rhinoscriptsyntax.SelectedObjectGrips (object_id)

rhinoscript.grips.SelectedObjectGrips (object_id)

Parameters

object_id

Required.  String or Guid.  The identifier of the object.

Returns

List

A list of zero-based grip indices identifying the selected grips.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Select curve", rs.filter.curve)

if obj:

    rs.EnableObjectGrips( obj )

    count = rs.ObjectGripCount( obj )

    for i in xrange(0,count,2):

        rs.SelectObjectGrip( obj, i )

    grips = rs.SelectedObjectGrips(obj)

    if grips: print len(grips), "grips selected"

Also See

EnableObjectGrips

SelectObjectGrip

SelectObjectGrips