ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Core.Geometry Namespace / PolylineBuilderEx Class / CreatePolyline Method / CreatePolyline(IEnumerable<IEnumerable<Segment>>,SpatialReference) Method
Parts to create the polyline. The spatial references of the segments in the parts are checked for compatibility.
(Optional) The SpatialReference. The default value is null. If spatialReference is null, then the spatial reference will be inherited from parts which requires traversing through the enumeration of points. For improved performance, use CreatePolyline(IEnumerable<IEnumerable<Segment>>,AttributeFlags,SpatialReference).
Example

In This Topic
    CreatePolyline(IEnumerable<IEnumerable<Segment>>,SpatialReference) Method
    In This Topic
    Convenience method to create a new instance of the Polyline class.
    Syntax
    Public Overloads Shared Function CreatePolyline( _
       ByVal parts As IEnumerable(Of IEnumerable(Of Segment)), _
       Optional ByVal spatialReference As SpatialReference _
    ) As Polyline

    Parameters

    parts
    Parts to create the polyline. The spatial references of the segments in the parts are checked for compatibility.
    spatialReference
    (Optional) The SpatialReference. The default value is null. If spatialReference is null, then the spatial reference will be inherited from parts which requires traversing through the enumeration of points. For improved performance, use CreatePolyline(IEnumerable<IEnumerable<Segment>>,AttributeFlags,SpatialReference).

    Return Value

    Exceptions
    ExceptionDescription
    Incompatible spatial references.
    parts is null.
    Remarks
    The HasZ, HasM and HasID properties are inherited from parts which requires traversing through the enumeration of points. For improved performance or if you want to set these properties yourself, use CreatePolyline(IEnumerable<IEnumerable<Segment>>,AttributeFlags,SpatialReference).
    Example
    Construct a Polyline - from a Cubic Bezier
    {
      polyline = PolylineBuilderEx.CreatePolyline(bezierSegment);
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also