我有一些问题,这个lisp例行有人可以帮我。
出于某种原因,它将删除比例列表,但不会继续并添加列出的比例。
下面是例行公事。
- (defun dwgcln (/)
- ;; reset all scales
- (command "_.-scalelistedit" "_r" "_y" "_e")
- ;; set current annoscale
- (setvar "cannoscale" "1:1")
- ;; issue scalelistedit command
- (command "_.-scalelistedit")
- ;; process list of scales to delete
- (foreach x '("1:4" "1:5" "1:8" "1:10" "1:16" "1:20" "1:30" "1:40" "1:50" "1:100" "2:1" "4:1" "8:1" "10:1" "100:1")
- (command "_d" x)
- )
- ;; process list of scales to add
- (foreach x '((cons "1"=10'" "1:120") (cons "1"=20'" "1:240")
- (cons "1"=30'" "1:360") (cons "1"=40'" "1:480")
- (cons "1"=50'" "1:600") (cons "1"=60'" "1:720")
- (cons "1"=70'" "1:840") (cons "1"=80'" "1:960")
- (cons "1"=90'" "1:1080") (cons "1"=100'" "1:1200")
- (cons "1:2" "1:2") (cons "1:5" "1:5")
- (cons "1:10" "1:10") (cons "1:20" "1:20")
- (cons "1:30" "1:30") (cons "1:40" "1:40")
- (cons "1:50" "1:50") (cons "1:60" "1:60")
- (cons "1:100" "1:100") (cons "1:200" "1:200")
- (cons "1:300" "1:300") (cons "1:400" "1:400")
- (cons "1:500" "1:500") (cons "1:600" "1:600")
- (cons "1:1000" "1:1000") (cons "1:2000" "1:2000"))
- (command "_A" (car x) ("cdr x"))
- )
- ;; exit scalelistedit
- (command "_e")
- ;; purge regapps
- (command "_.-purge" "_regapps" "*" "_n")
- )
哦,是的,我也想用这个例程来清理图纸中的regapps。 |