예제 #1
0
        public void testMirror()
        {
            Database db = HostApplicationServices.WorkingDatabase;
            Editor   ed = Application.DocumentManager.MdiActiveDocument.Editor;

            PromptSelectionOptions optSel = new PromptSelectionOptions();

            optSel.MessageForAdding = "请选择对象";
            PromptSelectionResult resSel = ed.GetSelection();

            if (resSel.Status != PromptStatus.OK)
            {
                return;
            }

            SelectionSet sset = resSel.Value;

            ObjectId[] ids = sset.GetObjectIds();

            foreach (ObjectId id in ids)
            {
                Edit.Mirror(id, new Point3d(0, 0, 0), new Point3d(300, 200, 0), false);
            }
        }