已经解决了! Sub addblock() '创建块 Dim p As Variant Dim blockObj As AcadBlock Dim ss As AcadSelectionSet Dim i As Long Dim obj() As AcadEntity Set ss = ThisDrawing.SelectionSets.Add("ss") ss.SelectOnScreen i = 0 For Each ent In ss Set obj(i) = ent i = i + 1 Next Set blockObj = ThisDrawing.Blocks.Add(p, "abc") ThisDrawing.CopyObjects obj, blockObj ss.Delete End Sub |