singlewolf 发表于 2004-12-23 16:31:00

急急急 我想得到DWG中所有的块名

急急急 我想得到DWG中所有的块名

wyj7485 发表于 2004-12-23 17:30:00

Sub       test()


Dim BLKSet As AcadSelectionSet


Dim i


Dim FilterType(0) As Integer<BR>Dim FilterData(0) As Variant


FilterType(0) = 0: FilterData(0) = "insert"


BLKSet.Select acSelectionSetAll, , , FilterType, FilterData


For i=1 To BLKSet.Count


Msgbox BLKSet(i).Name


Next


End Sub

雪山飞狐_lzh 发表于 2004-12-23 20:32:00

Sub test2()<BR>Dim i As AcadBlock<BR>For Each i In ThisDrawing.Blocks<BR>If Not (i.IsLayout Or i.IsXRef) Then<BR>MsgBox i.Name<BR>End If<BR>Next i<BR>End Sub<BR>
页: [1]
查看完整版本: 急急急 我想得到DWG中所有的块名