
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am setting up machines in my office with an ACADDOC.LSP AutoLISP Routine to load custom LISP routines to do the following on startup:
- Initialize the drawing environment routine:
(command ".setvar" "expert" 1)
(command ".viewres" "y" "5000")
(command ".color" "BYLAYER")
(command ".linetype" "set" "BYLAYER")
2.Redefine the Qsave command in “Stealth Mode” to automatically purge all blocks from the drawing every drawing session:
(command ".undefine" "QSAVE")
(defun c:qsave ()
(setvar "cmdecho" 0)
(command "-purge" "b" "*" "n")
(command ".qsave")
(setvar "cmdecho" 1)
(princ)
)
3.Undefine Qleader command with dialog box message to user to “Use Mleader Command!” to enforce CAD standards:
(command ".undefine" "QLEADER")
(defun C:QLEADER ()
(command ".qleader")
(alert "Use Mleader Command!")
(princ)
)
The problem is the custom LISP routines fail to load due code errors I can’t seem to figure out!
I get the following history message after startup:
Opening an AutoCAD 2007/LT 2007 format file.
Regenerating model.
.setvar expert 1 .viewres y 5000 .-color BYLAYER ; error: misplaced dot on input
AutoCAD menu utilities loaded..setvar expert 1 .viewres y 5000 .color BYLAYER .linetype set BYLAYER .undefine
Invalid option keyword.
; error: Function cancelled
*Cancel*
*Cancel*
I am new to writing AutoLISP routines. Can anyone please help me debug the above code?
I have attached .LISP files.
All help is greatly appreciated!
Corey Barge
Solved! Go to Solution.