- 积分
- 232
- 明经币
- 个
- 注册时间
- 2011-5-27
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
楼主 |
发表于 2016-1-29 20:20:54
|
显示全部楼层
mikewolf2k 发表于 2016-1-29 15:24
这样不可以吧?这样获得的是直接的line,你是要块中的,就得遍历块,然后遍历块中的子元素,符合要求再处 ...
Sub Ltoc(blk As AcadBlock)
Dim Sube As AcadEntity
For Each Sube In blk
If Sube.ObjectName = "AcDbLine" Then
Dim ss As AcadSelectionSet
Set ss = ThisDrawing.ActiveSelectionSet
Dim ft(0) As Integer
Dim fd(0) As Variant
ft(0) = 62 '组码
fd(0) = "5" '颜色码
ss.Select acSelectionSetAll, , , ft, fd
For Each ss In Sube
ss.Delete
Next
End If
Next
End Sub |
|