ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Editing.COGO Namespace / Traverse Class / CanAdjust Method
The adjustment method to use.
Example

In This Topic
    CanAdjust Method
    In This Topic
    Determines if the traverse can be adjusted with the specified adjustment method. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax

    Parameters

    adjustmentMethod
    The adjustment method to use.

    Return Value

    True if the traverse can be adjusted.
    Remarks
    There must be at least 2 courses in the traverse and the first course cannot be defined by a tangent curve or an angle/distance line.

    It is important to call this method prior to Adjust to ensure that the traverse is well defined and a possible result can be found.

    Note that if this method returns true it does not preclude the Adjust method from throwing an exception due to a calculation error and callers should code defensively and use appropriate exception handling.
    Example
    Traverse Adjustment
    if (travParcel.IsValid())
    {
      TraverseClosure travClosure = travParcel.GetClosure();
    
      if (travClosure.MiscloseDistance < 0.1)
      {
        if (travParcel.CanAdjust(TraverseAdjustmentMethod.Compass))
        {
          travParcel.Adjust(TraverseAdjustmentMethod.Compass);
    
          TraverseAdjustmentResults adjResults = travParcel.AdjustmentResults;
    
          var adjCoords = adjResults.AdjustedCoordinates;
          var adjustedCourses = adjResults.AdjustedCourses;
          var distanceResiduals = adjResults.DistanceResiduals;
          var directionResiduals = adjResults.DirectionalResiduals;
        }
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.7 or higher.
    See Also