ArcGIS Pro 2.9 API Reference Guide
CreatePolygon(IEnumerable<Polygon>,AttributeFlags,SpatialReference) Method

ArcGIS.Core.Geometry Namespace > PolygonBuilderEx Class > CreatePolygon Method : CreatePolygon(IEnumerable<Polygon>,AttributeFlags,SpatialReference) Method
Segments to create the polygon.
AttributeFlags to set the HasZ, HasM and HasID attributes. If no attributes should be set, pass AttributeFlags.NoAttributes. If all attributes should be set, pass AttributeFlags.AllAttributes. Use the bitwise OR operator to set two attributes. For example, to set HasZ = true and HasM = true, pass AttributeFlags.HasZ | AttributeFlags.HasM.
(Optional) The SpatialReference. The default value is null. The spatial reference of each polygon is ignored.
Convenience method to create a new instance of the Polygon class.
Syntax
Public Overloads Shared Function CreatePolygon( _
   ByVal polygons As IEnumerable(Of Polygon), _
   ByVal attributes As AttributeFlags, _
   Optional ByVal spatialReference As SpatialReference _
) As Polygon

Parameters

polygons
Segments to create the polygon.
attributes
AttributeFlags to set the HasZ, HasM and HasID attributes. If no attributes should be set, pass AttributeFlags.NoAttributes. If all attributes should be set, pass AttributeFlags.AllAttributes. Use the bitwise OR operator to set two attributes. For example, to set HasZ = true and HasM = true, pass AttributeFlags.HasZ | AttributeFlags.HasM.
spatialReference
(Optional) The SpatialReference. The default value is null. The spatial reference of each polygon is ignored.

Return Value

Exceptions
ExceptionDescription
polygons is null.
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

PolygonBuilderEx Class
PolygonBuilderEx Members
Overload List