这段代码工作得很好,但每次发出时,我都会收到一条错误消息。我知道这很简单,但我想不出来。缺少什么?非常感谢。
- (defun c:PSTAMPA ( / cl vb ll)
- (setq
- CL (getvar 'clayer)
- vb
- (assoc
- (progn
- (initget "Preliminary NFC")
- (getkword "Enter Orientation [Preliminary/Nfc]:")
- )
- '(("Preliminary" . "NOTE_PRELIM") ("NFC" . "NOTE_NFC"))
- )
- )
- (if (tblsearch "BLOCK" (cdr vb))
- (
- (progn
- (setq TAB (getvar "CTAB"))
- (foreach LL (layoutlist)
- (setvar "ctab" LL)
- (command "layer" "set" "QF-ANNO-NOTE" "" "_.INSERT" (cdr VB) "0,0" "1" "1" "0")
- (command "mview" "lock" "on" "all" "" (setvar "CTAB" TAB)
- )
- )
- )
- )
- )
- (alert "Plot stamps are not loaded, please use the load blocks button.")
- (princ)
- (command "layer" "s" CL "")
- )
|