Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
After running the code below, I get a message saying "The object is the paper space viewport." My question is: What in the code below is causing this message to occur? I've tested each portion individually with no such message, but when I run the code in whole, the message occurs. Needing a hand to understand why please.
(defun *error* (errmsg)
(if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break"))
(princ (strcat "\nError: " errmsg))
) ; end if
(command-s "._Undo" "E") ; corrects the UNDO init if the code is interrupted
(vl-bt) ; backtrace
) ; end defun
(defun C:ReloadSTEAMROLLER () ;; seperate command to reload the file during testing
(load "Geometry - LineweightByLayer(STEAMROLLER).lsp")
(load "Geometry - LineweightByLayer(STEAMROLLER).lsp") ; reload the code twice
(princ "\nLoaded! Try the code out!") ; Visual confirmation
(princ)
)
(defun SR:Mute ()
(setvar "CMDECHO" 0)
(setvar "NOMUTT" 1)
)
(defun SR:Unmute ()
(setvar "NOMUTT" 0)
(setvar "CMDECHO" 1)
)
(defun SR:Single (/ ss)
(command "change" "c" (getvar 'extmax) (getvar 'extmin) "" "p" "lw" "bylayer" "")
)
(defun SR:Multiple ()
(foreach layout (layoutlist)
(setvar "ctab" layout)
(SR:Single)
);foreach
(princ)
);defun
(defun c:STEAMROLLER (/ ans)
(initget 1 "Everything Sheet")
(setq ans (getkword "\nFix everything or just this sheet? [Everything/Sheet]"))
(cond
((eq ans "Sheet")
(SR:Mute)
(command "zoom" "e")
(SR:Single)
(SR:Unmute)
)
((eq ans "Everything")
(SR:Mute)
(command "zoom" "e")
(SR:Multiple)
(SR:Unmute)
)
);cond
(prompt "Okay, the Lineweights are set to <ByLayer>!")
(princ)
);defun
Please be kind, rewind your exploding. Do not explode hatching, dimensions or text. Think of your fellow drafters! 🙂
https://www.youracclaim.com/badges/9aa4a1d5-0d02-4888-be6f-ed8f0653d8ad/public_url
https://www.youracclaim.com/badges/9aa4a1d5-0d02-4888-be6f-ed8f0653d8ad/public_url
Solved! Go to Solution.