ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / SurfaceZsResult Class / Geometry Property
Example

In This Topic
    Geometry Property (SurfaceZsResult)
    In This Topic
    Gets the output geometry, provided the Status is SurfaceZsResultStatus.Ok. Null otherwise.
    Syntax
    Public ReadOnly Property Geometry As Geometry
    public Geometry Geometry {get;}
    Example
    Get Z values from a TIN Layer
    {
      // Note: Needs QueuedTask to run
      {
        if (tinLayer.CanGetZs())
        {
          // get z value for a mapPoint
          var zResult = tinLayer.GetZs(mapPoint);
          if (zResult.Status == SurfaceZsResultStatus.Ok)
          {
            // cast to a mapPoint
            var mapPointZ = zResult.Geometry as MapPoint;
            var z = mapPointZ.Z;
          }
    
          // get z values for a polyline
          zResult = tinLayer.GetZs(polyline);
          if (zResult.Status == SurfaceZsResultStatus.Ok)
          {
            // cast to a Polyline
            var polylineZ = zResult.Geometry as Polyline;
          }
        }
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also