[求助][VBA]如何创建块
请指点,如何把选择集里的对象转换为块? <P>'Re: Creating a Block from a Selection set<BR>'<BR>'P.Murali</P><P>Sub newblk()<BR>Dim obj() As Object<BR>Dim ss As AcadSelectionSet<BR>Dim blk As AcadBlock</P>
<P>Set ss = ThisDrawing.SelectionSets.Add("ss_SET")<BR>ss.SelectOnScreen<BR>pt = ThisDrawing.Utility.GetPoint(, "Pick an insertion point: ")</P>
<P>ReDim obj(0 To ss.Count - 1) As Object<BR>For i = 0 To ss.Count - 1<BR>Set obj(i) = ss.Item(i)<BR>Next i</P>
<P>Set blk = ThisDrawing.Blocks.Add(pt, "MYBLOCK")<BR>ThisDrawing.CopyObjects obj, blk<BR>'you can delete the original items after this<BR>ss.Delete<BR>End Sub<BR></P> <p>请问如何用 VBA编程创建 块对象哪?</p> 上面的程序就是 alin 发表于 2007-9-25 09:06
上面的程序就是
NUBILITY alin 发表于 2007-9-25 09:06
上面的程序就是
NUBILITY
页:
[1]