GetCurveObject

Prompts the user to pick, or select, a single curve object.

Syntax

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

rhinoscript.selection.GetCurveObject (message=None, preselect=False, select=False)

Parameters

message

Optional.  String.  A prompt or message.

preselect

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

select

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

Returns

Tuple

A tuple of selection information if successful. The tuple will contain the following information:

Element

Description

0

Guid. The identifier of the curve object.

1

Boolean. True if the curve was pre-selected, otherwise False.

2

Number. The selection method:     

0: selected by non-mouse method (SelAll, etc.).

1: selected by mouse click on the object.

2: selected by being inside of a mouse window.

3: selected by intersecting a mouse crossing window.

3

Point3d. The selection point. This value is valid only if the curve was not pre-selected and it was selected by clicking the mouse on the curve.

4

Number. The curve parameter of the selection point. This value is valid only if the curve was not pre-selected and it was selected by clicking the mouse on the curve.

5

String. The name of the view in which the selection was made.

None

If no object picked

Example

import rhinoscriptsyntax as rs

select_result = rs.GetCurveObject("Select curve")

if select_result:

    print "Curve identifier: ", select_result[0]

Also See

GetObject

GetObjects

GetSurfaceObject