IsLine

Verifies an object is a line curve object.

Syntax

rhinoscriptsyntax.IsLine (object_id, segment_index=-1)

rhinoscript.curve.IsLine (object_id, segment_index=-1)

Parameters

object_id

Required.  String or Guid.  The object's identifier.

segment_index

Optional. Number. If object_id identifies a polycurve object, then segment_index identifies the curve segment of the polycurve to query.

Returns

Boolean

True if successful, otherwise False.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Select a line")

if rs.IsLine(obj):

    print "The object is a line."

else:

    print "The object is not a line."

Also See

AddLine