Hello ALL,
I am still having an issue with my ACADDOC.LSP not loading when I am in the SDI=1. if I turn the SDI=0 the ACADDOC.LSP works fine. I have ALWAYS run in the SDI=1 mode. It worked up until about a month ago, something chaged and I cannot figure out what.
Anyone have any ideas what is going on and and idea how to fix this issue???
Thanks
Dennis
Solved! Go to Solution.
Solved by acade2012. Go to Solution.
No error but the ACADDOC.LSP still doesn't load unless SDI=0 as has been the case at the start of this issue. The errors only appeared once we started trying different things to try and fix this.
Your help has been greatly appreciated!!!!
Thanks
Dennis
OK, I'm not entirely sure why the acaddoc.lsp is not loading, but since the acad.lsp file loads with each drawing when SDI=1, try renaming the acaddoc.lsp to acad.lsp and see if it solves the problem.
ACAD.LSP does not load on every drawing even with the setting turn to load with each drawing.
Tried changing ACAD.LSP to ACADDOC.LSP still only loading when SDI=0 not working when SDI=1
I have also tried switching the CUIX file to the ACADE.CUIX file brought in when the ACADE was installed with no luck there either
Thanks again for your help
Next step is to reinstall the ACADE program
OK I have at least a work around. Since the ACADDOC.LSP loads on the initial page, I have put the ACADDOC.LSP into the startup suite. It now loads whether the SDI is 0 or 1. Not sure that's how its meant to be but it works... At least for me.
Thanks Again for your help!!!
Dennis
That all sounds very odd - but glad you found a solution!
There are a few system variables that control the behaviour of acad.lsp and acaddoc.
This is from a quick search on these forums, from a poster abbas
The acad.lsp file is intended to be used for application-specific startup routines, all functions and variables defined in an acad.lsp file are only available in the first drawing. You will probably want to move routines that should be available in all documents from your acad.lsp file into the acaddoc.lsp file. The recommended functionality of acad.lsp and acaddoc.lsp can be overridden with the ACADLSPASDOC system variable. If the ACADLSPASDOC system variable is set to 0 (the default setting), the acad.lsp file is loaded just once: upon application startup. If set to 1, the acad.lsp file is reloaded when a new drawing is created or an existing drawing file is opened.
------------------------------------------------------------------------------------------------------------
The acaddoc.lsp file is intended to be associated with each document (or drawing) initialization. This file is useful if you want to load a library of AutoLISP routines to be available every time you start a new drawing (or open an existing drawing). Each time a drawing opens, AutoCAD searches the library path for an acaddoc.lsp file. If it finds one, it loads the file into memory. The acaddoc.lsp file is always loaded with each drawing regardless of the settings of ACADLSPASDOC.
Thanks,
Abbas
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
There's that one and also the following that has an effect on the above, these two in combination with what's been outlined in earlier posts in this thread should have you gain an understanding of what's happening with your acad and acaddoc files as well as a variety of system vars that effect them. Acadlspasdoc, SDI, Lispinit, are all going to need to be checked.
In single-document interface, specifies whether AutoLISP functions and variables are preserved when a new drawing is opened.
0 | AutoLISP functions and variables are preserved from drawing to drawing |
1 | AutoLISP functions and variables are valid in the current drawing only |
When SDI is set to 0, AutoLISP always behaves as if LISPINIT were set to 1. For information about the behavior of AutoLISP-defined functions and variables in a multiple-document interface, see the AutoLISP Developer's Guide.
One method to circumvent these switches is to sneak all your declarations into a MNL file.
I have a switch in there that tries to find my Utility file, and if found, loads it.
It is not part of ACAD.lsp or any other *Doc.lsp file...
My utility file has over 180 keyboard declarations.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
You're not the first one to have these problems, HTH 🙂
The MNL File suggestion is the one I currently use as well. It loads automatically upon a profile with the same name being opened, so you customize your .mnl's to be profile specific and shun acad.lsp and acadlspasdoc completely. Their behaviour is dependant on the conditions outlined in the previous post and that means that if you're on a network, that scripting each workstation would be the necessary means to get them all aligned---and as you know, people don't like their SDI mode to be messed with----what ive found to be the most effecient workaround---mnls