班森,
我对你的代码做了一点修改。它执行,尽管我不确定它是否在做你想做的事情。虽然拉伸命令似乎已经完成,但正如Dave和Alan警告的那样,它可能正在做一些奇怪的事情。
- (defun C:OCNCU ( ) ; Old CNC Update
- (setq len (getdist "Enter Cover Length = ")); Cover Length User Input
- (setq ptx (- len 0.25))
- ;(command ".delete" (ssget "C" '(0.25 25.0) '(ptx 26.0)) "") ; Erase Extra Lines
- (command ".delete" (ssget "C" (list 0.25 0.25) (list ptx 26.0)) "") ; added close parens
- ;(setq SX (rtos 0.0) SY (rtos (/ len 20)))
- (setq SX 0.0 SY (/ len 20)) ; must be reals - can't be strings
-
- ;(command ".stretch" (ssget "C" (list 9.1 0.25) (list ptx 41.0)) "" (list 0 0) "" (list SX SY))
- (command ".stretch" (list 9.1 0.25) (list ptx 41.0) "" (list 0 0) (list SX SY)) ; give it discrete points instead of SS
- (command "zoom" "e")
- ); end of OCNCU
|