ArcObjects Library Reference (Geometry)  

IEnvelope.OffsetZ Method

Moves the sides z units.

[Visual Basic .NET]
Public Sub OffsetZ ( _
    ByVal Z As Double _
)
[C#]
public void OffsetZ (
    double Z
);
[C++]
HRESULT OffsetZ(
  double Z
);
[C++]

Parameters

Z   Z is a parameter of type double

Product Availability

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

Description

OffsetZ shifts the Z attributes of the Envelope.  The Depth remains unchanged.

Remarks

new ZMin = old ZMin + Z
new ZMax = old ZMax + Z
[C#]

 

        public static void TestOffsetZ()

        {

            const double Offset = 14.928;

 

            IEnvelope2 envelope = GetEnvelopeGeometry() as IEnvelope2;

 

            double beforeXMin, beforeXMax, beforeYMin, beforeYMax;

            envelope.QueryCoords(out beforeXMin, out beforeYMin, out beforeXMax, out beforeYMax);

 

            double beforeZMin, beforeZMax;

            envelope.QueryZCoords(out beforeZMin, out beforeZMax);

 

            envelope.OffsetZ(Offset);

 

            double afterXMin, afterXMax, afterYMin, afterYMax;

            envelope.QueryCoords(out afterXMin, out afterYMin, out afterXMax, out afterYMax);

 

            double afterZMin, afterZMax;

            envelope.QueryZCoords(out afterZMin, out afterZMax);

 

            //beforeXMin = 3.33

            //beforeXMax = 13.33

            //beforeYMin = -10.864

            //beforeYMax = -0.864

            //beforeZMin = -3.972

            //beforeZMax = 6.028

 

            //afterXMin = 3.33

            //afterXMax = 13.33

            //afterYMin = -10.864

            //afterYMax = -0.864

            //afterZMin = 10.956

            //afterZMax = 20.956

        }

 

See Also

IEnvelope Interface