This document is archived and information here might be outdated.  Recommended version.

ISegmentZ.GetZs Method (ArcObjects .NET 10.7 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IS > ISegmentZ Interface > ISegmentZ.GetZs Method
ArcGIS Developer Help

ISegmentZ.GetZs Method

Get the Zs on the segment's endpoints.

[Visual Basic .NET]
Public Sub GetZs ( _
    ByRef fromZ As Double, _
    ByRef toZ As Double _
public void GetZs (
    ref double fromZ,
    ref double toZ
  System.Double* fromZ,
  System.Double* toZ
fromZ [out]

fromZ is a parameter of type double* toZ [out]
toZ is a parameter of type double*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Returns the Z attributes held by the From and To point of the segment.




        public static void GetZs()


               IGeometry geometry = GetLineGeometry();

 segmentZ = geometry as ISegmentZ;

               double fromZ;
               double toZ;

               segmentZ.GetZs(out fromZ, out toZ);

               //fromZ = 0.224
               //toZ = 8.29


See Also

ISegmentZ Interface