ArcGIS Pro 2.9 API Reference Guide
CreateEnvelope(MapPoint,MapPoint,SpatialReference) Method

ArcGIS.Core.Geometry Namespace > EnvelopeBuilderEx Class > CreateEnvelope Method : CreateEnvelope(MapPoint,MapPoint,SpatialReference) Method
Lower left corner of the envelope.
Upper right corner of the envelope.
(Optional) The SpatialReference. The default value is null. If spatialReference is null, then the spatial reference is inherited from minPoint or maxPoint.
Convenience method to create a new instance of the Envelope class.
Syntax
Public Overloads Shared Function CreateEnvelope( _
   ByVal minPoint As MapPoint, _
   ByVal maxPoint As MapPoint, _
   Optional ByVal spatialReference As SpatialReference _
) As Envelope

Parameters

minPoint
Lower left corner of the envelope.
maxPoint
Upper right corner of the envelope.
spatialReference
(Optional) The SpatialReference. The default value is null. If spatialReference is null, then the spatial reference is inherited from minPoint or maxPoint.

Return Value

Exceptions
ExceptionDescription
minPoint or maxPoint is null.
Incompatible spatial references. The spatial references of the MapPoints do not match.
Remarks
The spatial references of the two points must be the same or null.The resulting envelope is normalized to ensure its XMin <= XMax, YMin <= YMax, ZMin <= ZMax and MMin <= MMax. If any of the xy-coordinate values are NaN, then the envelope is set to empty.

The resulting envelope inherits attributes, Z, M and ID-values, from the input points. For example, if either minPoint or maxPoint HasZ property is true, then the envelope's HasZ property is true.

Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

EnvelopeBuilderEx Class
EnvelopeBuilderEx Members
Overload List