试试这个:
- (defun c:Hcutinoutline (/ aa chklay)
- (setvar "osmode" 128)
- (setvar "orthomode" 1)
- (setq chklay (tblsearch "layer" "4"))
- (if (= chklay nil) (command "layer" "n" "4" "c" "50" "4" ""))
- (setvar "clayer" "4")
- (setvar "CECOLOR" "bylayer")
- (setvar "CELTYPE" "Continuous")
- (setq aa T)
- (vl-cmdf "LINE" PAUSE)
- (while aa
- (if (null (vl-cmdf PAUSE))
- (progn
- (setvar "osmode" 0)
- (setvar "orthomode" 0)
- (princ"\n 垂直引入线 第4层")
- (setq aa nil)
- )
- )
- )
- (princ)
- )
|