几何尺寸与公差论坛------致力于产品几何量公差标准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=10306)

yang686526 2009-04-23 04:04 PM

【转帖】[求助]请教高手,帮我看看这段程序,为何不起作用呢?
 
[求助]请教高手,帮我看看这段程序,为何不起作用呢?
www.dimcax.com
[求助]请教高手,帮我看看这段程序,为何不起作用呢?
用途:把实体填充变成斜线填充.
(defun c:aa ( / e eee n ss)
(setq ss (ssget '((0 . "solid"))))
(if ss
(progn
(setq n -1)
(repeat (sslength ss)
(setq eee (ssname ss (setq n (+ n 1)))
e (entget eee))
(setq e (subst (cons 100 "acdbentity") (assoc 100 e) e))
(setq e (subst (cons 100 "acdbhatch") (assoc 100 e) e))
(setq e (subst (cons 0 "hatch") (assoc 0 e) e))
(setq e (subst (cons 2 "ansi31") (assoc 2 e) e))
(setq e (append e (list (cons 41 55))))
(entmod e)
)
(princ "\n已更新完成!")
))
(princ)
)
为何不起作用?
d
"solid"和"hatch"是两张不同的对象,组码参数相差很大
d
这个海龙的工具箱估计也是......
如caoyin斑竹说的,2个组码参数错太多!
d


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