|
(defun c:ll (/ CURVE TLEN SS N SUMLEN)
! [/ M- x$ v) y! R$ Q9 n
( O0 {3 U, Y# J6 }; H3 v/ A- c(command "pline") ;要实现此功能代码应如何写???6 d, {! j2 Z/ T+ K# X2 z
/ ]4 ?5 s- Y# r (vl-load-com)4 C1 J1 E4 G0 `/ m* W$ `- @# G* v
(setq ss (ENTLAST))$ }4 B- l1 W @' m
(setq CURVE (vlax-ename->vla-object ss))
# g+ Z- H2 q& X# }5 {. x6 p6 ` (setq TLEN (vlax-curve-getdistatparam CURVE (vlax-curve-getendparam CURVE)))5 F3 ~- S2 ~9 }/ m
(print (strcat "选" "总长度=" (rtos tlen 2 4)))! g# V4 r7 y/ T% m: I
(princ)9 o7 p5 G* g% r6 {; O
)& A+ C4 u* S, r* Z0 q/ Y& j
本人初学菜鸟,上面的代码有问题,请高手指点怎样写才能达到我的目的!? |
|