|
在网上找到一英文的..............
# j: p8 I3 g$ m$ `; L0 h: A7 A# W% l8 S1 N# |5 {+ p* j% |5 e* ^
Here's one for the AutoLISPers out there. In the drawing left over from the previous bug, list one of each of the different leaders. Note that the original one has the style name Standard, and the newly drawn one has the style name Standard$7. This is how AutoCAD designates the use of a child dimension style. Standard$0 indicates a linear dimension child style, Standard$4 is a radius style, and so on. In AutoLISP, you can use the (ssget) function to select dimensions based on these styles. For example, this code snippet selects all Standard dimensions that use a linear child style:4 G9 K; x+ \8 d# p, M+ }* i
1 Q" k" x3 b4 o9 K) h(ssget "X" '((0 . "DIMENSION") (3 . "Standard$0")))9 F7 B4 X. m9 K Y" f7 B
) ?5 L; {4 p% Z9 N2 [Likewise, the following selects all Standard dimensions that don't use a child style:9 n7 S5 W0 q4 l; d+ U1 g. X4 w
2 \7 o, P0 d! H P; y+ R: {( I(ssget "X" '((0 . "DIMENSION") (3 . "Standard"))) v- \) Q* ]9 g- `
9 F5 O$ ~( G7 N5 d
It follows that this should select all Standard leaders that use a child style:
6 I) D1 [/ @" w0 u5 Z4 {
, m# c. v% \( G0 O j(ssget "X" '((0 . "LEADER") (3 . "Standard$7")))' H" `2 c& I8 }6 l7 \
) x0 Z0 ]1 T( y3 n+ e0 ~But it doesn't select anything, and that's a bug. Likewise, this should select all Standard leaders that don't use a child style:
. b K5 F3 l7 g- D4 W
6 D1 T+ b0 K* x2 S Y: Q. H5 n1 Q(ssget "X" '((0 . "LEADER") (3 . "Standard")))
# k* a" Q' p* X: m5 v) b6 h5 H2 X
5 f% o) X& C7 v, I3 F3 L; cInstead, it selects all Standard leaders, regardless of whether they use a child style. These bugs can cause problems with innocent menu macros and AutoLISP routines.
) U* y& N6 t. N* A* X$ C) Y
. y+ N( p! q! C2 Q5 Q3 s# U+ P4 N/ I
4 M% O. B8 G9 j8 G4 {1 M
9 h. s2 i( C/ B% {! j. O
2 ^) N2 n1 _% g6 S& S T) M
[ 本帖最后由 truezx 于 2008-4-21 16:29 编辑 ] |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|