GetObjectGrips

Prompts the user to pick or select one or more object grips from one or more objects.

Syntax

rhinoscriptsyntax.GetObjectGrips (message=None, preselect=False, select=False)

rhinoscript.grips.GetObjectGrips (message=None, preselect=False, select=False)

Parameters

message

Optional.  String.  A prompt or message.

preselect

Optional.  Boolean.  Allow for the selection of a pre-selected object grips.  If omitted, pre-selected object grips are not accepted (False).

select

Optional.  Boolean.  Select the picked object grips.  If omitted, the object grips that are picked are not selected (False).

Returns

List

A list containing one or more object grip records if successful. An object grip record itself is a list that contains the following three elements:

Element

Type

Description

0

Guid

The identifier of the object that owns the grip.

1

Number

The zero-based index value of the grip.

2

Point3d

A 3-D point identifying the location of the grip.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

curves = rs.GetObjects("Select curves", rs.filter.curves)

if curves:

    for curve in curves: rs.EnableObjectGrips(curve)

    grips = rs.GetObjectGrips("Select curve grips")

    if grips: for grip in grips: print grip[0]

Also See

GetObjectGrip