1.过滤块 PromptSelectionOptions pOptions = new PromptSelectionOptions(); TypedValue[] filList = { new TypedValue((int)DxfCode.Start, "INSERT") } ; SelectionFilter filter = new SelectionFilter(filList); PromptSelectionResult res = ed.GetSelection(pOptions, filter); // *** if (res.Status != PromptStatus.OK) return ; Autodesk.AutoCAD.EditorInput.SelectionSet SS = res.Value; ObjectId[] idArray = SS.GetObjectIds(); 2.过滤多线 TypedValue[] filList = { new TypedValue((int)DxfCode.Start, "LWPolyLine") } ; SelectionFilter filter = new SelectionFilter(filList); PromptSelectionResult res = ed.SelectAll(filter); // *** if (res.Status != PromptStatus.OK) return ; Autodesk.AutoCAD.EditorInput.SelectionSet SS = res.Value; ObjectId[] idArray = SS.GetObjectIds(); 转载于:https://www.cnblogs.com/wf225/archive/2008/01/14/1038195.html