
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am working on a LISP program to run when opening a drawing to enforce standards. I found the following code (on a forum post; I can't remember where) to provide some control over whether or not the program runs if opening a new drawing or opening a previously saved drawing. I want it to automatically run when opening a new drawing and prompt user to decide whether or not they want it to run when opening a previously saved drawing.
I had a long (illness filled) weekend and can't remember where I left off, but when I went load this particular selection of code, the command line repeated "Initializing..." over and over again and AutoCAD then crashed. When I opened AutoCAD again it would crash once the program automatically ran at start-up. I removed the following code from the program, so I'm assuming the problem is somewhere in here:
(if (= (getvar 'dwgtitled) 0) (c:standardsetup) ((initget "Continue Cancel") (if (= "Continue" (getkword "\nRun Standard Set-up? [COntinue/CAncel] <Cancel>: ")) (if (or c:standardsetup (and (load "C:\\Users\\mcfoster1\\AppData\\Roaming\\Autodesk\\C3D 2019\\enu\\Support\\Individual LISP Routines\\Standard Set-up.lsp" nil) c:standardsetup)) (c:standardsetup) (princ "\nc:standardsetup could not be defined.") ) ) ) )
Is there something in this selection of code that I have wrong that would cause this crashing loop?
Thank you!
Michael
Solved! Go to Solution.