public void testArrayRectang() { 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.ArrayRectang(id, 5, 8, 300, 200); } }