Beispiel #1
0
        public void AddShapeToTin()
        {
            object           Missing = Type.Missing;
            IPointCollection ptc     = pGeometry as IPointCollection;

            if (ptc == null)
            {
                return;
            }
            //for (int i = 0; i < ptc.PointCount; i++)
            //{
            //    IPoint pt = ptc.get_Point(i);
            //    IZAware pza = pt as IZAware;
            //    pza.ZAware = true;
            //    pt.Z = dHeight;
            //}
            IZAware pza = pGeometry as IZAware;

            pza.ZAware = true;
            IZ pz = pGeometry as IZ;

            pz.SetConstantZ(dHeight);
            try
            {
                pTinEdit.AddShapeZ(pGeometry, esriTinSurfaceType.esriTinHardReplace, 0, ref Missing);
            }
            catch (SystemException e)
            {
            }
            if (pMapCtr != null)
            {
                pMapCtr.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);
            }
        }