dj0737 发表于 2013-8-18 01:57 
能不能指定图层随层啊??
 - ;试试这个,可以指定随层的。
- (defun c:t1 ()
- (vl-load-com)
- (setq ss (ssget '((0 . "*LINE,CIRCLE,ELLIPSE,ARC"))))
- (setq i 0)
- (repeat (sslength ss)
- (setq entnam (ssname ss i)
- obj (vlax-ename->vla-object entnam)
- obj_col (vla-get-color obj)
- )
- (if (/= obj_col 256)
- (vla-put-color obj 256)
- )
- (setq i (1+ i))
- )
- )
|