This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IS > ISegmentZ Interface > ISegmentZ.GetZs Method (ArcObjects .NET 10.4 SDK) |
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
Returns the Z attributes held by the From and To point of the segment.
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
}