几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(AutoLISP) (http://www.dimcax.com/hust/forumdisplay.php?f=178)
-   -   [讨论]绘制多条线段 (http://www.dimcax.com/hust/showthread.php?t=11421)

yang686526 2009-04-26 03:37 PM

[讨论]绘制多条线段
 
[讨论]绘制多条线段
www.dimcax.com

(defun c:aaa()
(command "_mline" "st" "3气" "pause")

(while (= (logand (getvar "cmdactive") 1) 1) (command pause))
(command "explode" (entlast) "")
(setq ll (cons 8 "0")
yl (cons 8 "1")
ysl (cons 8 "2")
zkl (cons 8 "3")
;ol (cons 62 1)
)
(setq ss (ssget "p")) ;获得选集

(setq n 0)
(repeat (sslength ss)
(setq ents (entget (ssname ss n))
pp (cdr (assoc 62 ents)))
(cond
((= pp '1) (entmod (subst yl ll ents)))
((= pp '6) (entmod (subst zkl ll ents)))
((= pp '230) (entmod (subst ysl ll ents)))
)
;(entmod ents)
(setq n (1+ n))

);repeat
)
(defun *error* (msg)
(princ "failure at:")
(princ msg)
(princ))
如上可以解决问题,谢谢各位的帮助~~
d


所有的时间均为北京时间。 现在的时间是 12:37 PM.