PolyCurveCount

Returns the number of curve segments that make up a polycurve.

Syntax

rhinoscriptsyntax.PolyCurveCount (curve_id, segment_index=-1)

rhinoscript.curve.PolyCurveCount (curve_id, segment_index=-1)

Parameters

curve_id

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

segment_index

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

Returns

Number

The number of curve segments in a polycurve if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

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

if rs.IsPolyCurve(obj):

    count = rs.PolyCurveCount(obj)

    if count: print "The polycurve contains", count, " curves."

Also See

IsPolyCurve