GetObjectGrip

Prompts the user to pick or select a single object grip.

Syntax

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

rhinoscript.grips.GetObjectGrip (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 grip.  If omitted, pre-selected object grips are not accepted (False).

select

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

Returns

List

A list containing the following three elements if successful:

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

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

if curve:

    rs.EnableObjectGrips( curve )

    grip = rs.GetObjectGrip("Select a curve grip")

    if grip: print grip[2]

Also See

GetObjectGrips