非常抱歉,Gazzalp,我没有在我的机器上测试最后一个LISP,因为我没有必要的线型等。
无论如何,这应该有效:
- (defun c:membrane (/ ent pt l1 l2)
- (setq oldlay (getvar "clayer"))
- (while (and
- (setq ent (car (entsel "\nSelect object to offset 5 or <exit>:")))
- (setq pt (getpoint "\nSpecify point on side to offset:"))
- ) ;_ end and
- (if (not (tblsearch "Layer" "Membrane"))
- (command "-layer" "m" "Membrane" "")
- ) ;_ end if
- (command "._offset" 5.00 ent "_non" pt "")
- (setq l1 (entlast))
- (command "._offset" 10.00 ent "_non" pt "")
- (setq l2 (entlast))
- (command "_chprop" l1 "" "c" "cyan" "lt" "awthidden2" "la" "Membrane" "")
- (command "_chprop" l2 "" "c" "red" "lt" "continuous" "la" "Membrane" "")
- ) ;_ end while
- (setvar "clayer" oldlay)
- (princ)
- ) ;_ end defun
好我突然想到了。。。 |