|
发表于 2014-7-5 19:07:17
|
显示全部楼层
upc1999 发表于 2014-7-5 14:48 static/image/common/back.gif
( d8 K. t: |5 h/ ?5 ~版主厉害,代码测试成功。: S: h) S7 w3 X8 M* L1 D
再请教版主,块名称有十几种,开头都是GB,比如GBA1、GBA2、GBA3,图中可能有其 ... - Dim SS As AcadSelectionSet, FT(5) As Integer, FD(5) As Variant
1 V; f5 j; h3 Q0 n% b ]# t% X. d/ ?7 c - FT(0) = 0: FD(0) = "INSERT"# z6 T" q7 S, k8 V8 D" X M
- FT(1) = -4: FD(1) = "<or"
" D0 {- s- U; O+ V5 ^ - FT(2) = 2: FD(2) = "块名称1"
8 b! R" A0 {9 D g - FT(3) = 2: FD(3) = "块名称2"7 ]2 e2 G# F- d" Q* |9 Y h
- FT(4) = 2: FD(4) = "块名称3"9 i3 } D) r/ L/ ]' I% i
- FT(5) = -4: FD(5) = "or>"
# W8 c/ L' r% \3 g# `- x - Set SS = ThisDrawing.SelectionSets.Add("SSS")
+ M5 n, M& S4 R/ |. [! n) Q - SS.Select acSelectionSetAll, , , FT, FD
$ W5 b3 o) ]6 a2 M" V - MsgBox "图形中包含有名为" & Chr(34) & "块名称1" & Chr(34) & "或" & Chr(34) & "块名称2" & Chr(34) & "或" & Chr(34) & "块名称3" & Chr(34) & "的块参照共" & SS.Count & "个", vbOKOnly
, ]% l U4 T: o" j) o& N$ ^- i - SS.Delete+ D4 I9 ]) B2 N. }* D& d- H
复制代码 |
|