ArcObjects Library Reference (Geometry)  

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 _
)
[C#]
public void GetZs (
    ref double fromZ,
    ref double toZ
);
[C++]
HRESULT GetZs(
  double* fromZ,
  double* toZ
);
[C++]

Parameters

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.

Description

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

[C#]

 

 

        public static void GetZs()

        {

               IGeometry geometry = GetLineGeometry();


               ISegmentZ
 segmentZ = geometry as ISegmentZ;

               double fromZ;
               double toZ;

               segmentZ.GetZs(out fromZ, out toZ);

               //fromZ = 0.224
               //toZ = 8.29

        }

See Also

ISegmentZ Interface