GetLine

Prompts the user to pick points that define a line.

Syntax

rhinoscriptsyntax.GetLine (mode=0, point=None, message1=None, message2=None, message3=None)

rhinoscript.userinterface.GetLine (mode=0, point=None, message1=None, message2=None, message3=None)

Parameters

mode

Optional.  Integer.  The line definition mode. The possible values are as follows:

Value

Description

0 (Default)

Show all modes, start in two-point mode

1

Two-point.  Defines a line from two points.

2

Normal.  Defines a line normal to a location on a surface.

3

Angled.  Defines a line at a specified angle from a reference line.

4

Vertical.  Defines a line vertical to the construction plane.

5

Four-point.  Defines a line using two points to establish direction and two points to establish length.

6

Bisector.  Defines a line that bisects a specified angle.

7

Perpendicular.  Defines a line perpendicular to or from a curve

8

Tangent.  Defines a line tangent from a curve.

9

Extension.  Defines a line that extends from a curve.

point

Optional.  Point.  An optional starting point. Of omitted, the user will be prompted for the starting point.

message1

Optional.  String.  A prompt or message for the first point.

message2

Optional.  String.  A prompt or message for the second point.

message3

Optional.  String.  A prompt or message for the mid point.

Returns

Tuple

A tuple of two 3-D points that define the line if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

line = rs.GetLine()

if line: rs.AddLine( line[0], line[1] )

Also See

GetBox

GetPoint

GetPolyline

GetRectangle