|
|
发表于 2012-5-25 14:28:32
|
显示全部楼层
来自: 中国台湾
这个小程序可适用一些情况
# V M0 N" y$ R6 [% O7 P8 D可依这个思路修订补强来符合更多的情况
, @% f: V5 n5 x& k5 E; {9 J$ @8 ]+ L1 P7 [% o- [$ M5 S; c/ o- @% ]
(defun C:fDotDim ()
3 s. P; {4 f C$ J/ j; f6 V (setq pt (getpoint "\n 标注基点: "), ?9 S( \5 |* X9 B
ee (entsel "\n 选取垂线: ") ; 靠近 pt
! g, z9 l4 Y0 E7 l p1 (Osnap (cadr ee) "End")
1 B& `8 ~+ g/ @ p5 (Osnap (cadr ee) "Mid")
& ?+ u* U4 C" Z7 L# m9 {3 }; [4 m& u p2 (vlax-curve-getClosestPointTo (car ee) pt T)
2 `7 M7 b' f Z* ?. W$ O" i ). J% r0 e/ R0 @. C
(command "Line" p1 p5 "")
& a( B" _3 x4 g% t0 | (setq ee (entlast))& u# [) w+ z8 p7 l( {
(command "UCS" "Object" ee)
; X2 L9 W! ?9 N# Z (command "Dim" "Ver" (trans p1 0 1) (trans pt 0 1) pause "" "E")+ ]0 r+ `, i, d. ^' o$ L7 o
(entdel ee)( }! O4 g" C, w$ f
(command "UCS" "W")
8 J9 r' |" _( W" e- n) / b4 [! w9 r5 K, P s- O
: ?5 a. u0 P+ ?0 h3 _5 i8 Q; For test only |
评分
-
查看全部评分
|