Beispiel #1
0
        public void TestChangeLayer()
        {
            //改变圆的图层
            Entity ent = SelectObjOperation.SelectEntity("请选择一个实体:\n");

            change(ent);
        }
Beispiel #2
0
        public void TestSelectRectangle()
        {
            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;

            SelectObjOperation.FilterType[] filter = new SelectObjOperation.FilterType[1];
            filter[0] = SelectObjOperation.FilterType.LWPOLYLINE;
            ed.WriteMessage(SelectObjOperation.SelectAll(filter).Count.ToString());
        }
Beispiel #3
0
        /// <summary>
        /// 选取插入的基点
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button3_Click(object sender, EventArgs e)
        {
            Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;

            SelectObjOperation.SelectCADWindows();
            PromptPointResult pt = ed.GetPoint("\n请选择点");

            if (pt.Status == PromptStatus.OK)
            {
                bPoint = (Point3d)pt.Value;
                ShowMsgOperation.Message("您选择了点:" + bPoint.X + "," + bPoint.Y + "\n");
            }
            else
            {
                ShowMsgOperation.Message("未选择点,默认为原点");
            }
            lblPointValue.Text = bPoint.X.ToString() + " , " + bPoint.Y.ToString();
            this.Focus();
        }