测量面积的简单实现

  public override void OnMouseDown(int Button, int Shift, int X, int Y)
        {
            IActiveView pActView = m_hookHelper.ActiveView;
            IScreenDisplay pScreen = pActView.ScreenDisplay;
            IRubberBand pRubber = new RubberPolygonClass();
            IPolygon pPolygon = pRubber.TrackNew(pScreen, null) as IPolygon ;
            IArea pArea = pPolygon as IArea;
            double dArea =  pArea.Area;
            MessageBox.Show("面积为:" + dArea);
            
        }

你可能感兴趣的:(实现)