ArcGIS Pro 2.7 API Reference Guide
SetIDCoords Method
Example 

ArcGIS.Core.Geometry Namespace > EnvelopeBuilderEx Class : SetIDCoords Method
One of the id-coordinates
One of the id-coordinates
Sets the id-coordinates, that is, IDMin and IDMax. Also sets HasID = true.
Syntax
public void SetIDCoords( 
   int id1,
   int id2
)
Public Sub SetIDCoords( _
   ByVal id1 As Integer, _
   ByVal id2 As Integer _
) 

Parameters

id1
One of the id-coordinates
id2
One of the id-coordinates
Remarks
This method will figure out which value to set as IDMin and IDMax.
Example
Coordinate2D minCoord = new Coordinate2D(1, 3);
Coordinate2D maxCoord = new Coordinate2D(2, 4);

// Builder constructors need to run on the MCT.
ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
  using (EnvelopeBuilder builder = new EnvelopeBuilder(minCoord, maxCoord))
  {
    // builder.XMin, YMin, Zmin, MMin  = 1, 3, 0, double.Nan
    // builder.XMax, YMax, ZMax, MMax = 2, 4, 0, double.Nan

    // set XMin.  if XMin > XMax; both XMin and XMax change
    builder.XMin = 6;
    // builder.XMin, YMin, ZMin, MMin  = 6, 3, 0, double.Nan
    // builder.XMax, YMax, ZMax, MMax = 6, 4, 0, double.Nan

    // set XMax
    builder.XMax = 8;
    // builder.XMin, YMin, ZMin, MMin  = 6, 3, 0, double.Nan
    // builder.XMax, YMax, ZMax, MMax = 8, 4, 0, double.Nan

    // set XMax.  if XMax < XMin, both XMin and XMax change
    builder.XMax = 3;
    // builder.XMin, YMin, ZMin, MMin  = 3, 3, 0, double.Nan
    // builder.XMax, YMax, ZMax, MMax = 3, 4, 0, double.Nan

    // set YMin
    builder.YMin = 2;
    // builder.XMin, YMin, ZMin, MMin  = 3, 2, 0, double.Nan
    // builder.XMax, YMax, ZMax, MMax = 3, 4, 0, double.Nan

    // set ZMin.  if ZMin > ZMax, both ZMin and ZMax change
    builder.ZMin = 3;
    // builder.XMin, YMin, ZMin, MMin  = 3, 2, 3, double.Nan
    // builder.XMax, YMax, ZMax, MMax = 3, 4, 3, double.Nan

    // set ZMax.  if ZMax < ZMin. both ZMin and ZMax change
    builder.ZMax = -1;
    // builder.XMin, YMin, ZMin, MMin  = 3, 2, -1, double.Nan
    // builder.XMax, YMax, ZMax, MMax = 3, 4, -1, double.Nan

    builder.SetZCoords(8, -5);
    // builder.XMin, YMin, ZMin, MMin  = 3, 2, -5, double.Nan
    // builder.XMax, YMax, ZMax, MMax = 3, 4, 8, double.Nan

    Coordinate2D c1 = new Coordinate2D(0, 5);
    Coordinate2D c2 = new Coordinate2D(1, 3);
    builder.SetXYCoords(c1, c2);
    // builder.XMin, YMin, ZMin, MMin  = 0, 3, -5, double.Nan
    // builder.XMax, YMax, ZMax, MMax = 1, 5, 8, double.Nan

  }
});
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

EnvelopeBuilderEx Class
EnvelopeBuilderEx Members