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


ISegmentZ.GetZs Method (ArcObjects .NET 10.8 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 _
)
[C#]
public void GetZs (
    ref double fromZ,
    ref double toZ
);
[C++]
HRESULT GetZs(
  System.Double* fromZ,
  System.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