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.
There is a note buried somewhere (the AutoCAD knowledge base, I think) which indicates the ACAD.LSP loads for every file when SDI mode is used. I've never had problems with the ACADDOC.LSP under these circumstances, though.
When I open an existing drawing this is what I get when SDI=0
Opening an AutoCAD 2007/LT 2007 format file.
Regenerating model.
AutoCAD menu utilities loaded.cmdecho
Enter new value for CMDECHO <1>: 0
*** My acaddoc.lsp loaded ***
AutoCAD Electrical menu utilities loaded.
Command:
Autodesk DWG. This file is a TrustedDWG last saved by an Autodesk application
or Autodesk licensed application.
Command:
Command:
Command:
when in SDI=1
Opening an AutoCAD 2007/LT 2007 format file.
Regenerating model.
Command:
Command:
Command:
It does not see the ACADDOC.LSP at all
Just for testing purposes add this line at your acaddoc.lsp and restart the program...
(alert "*** My acaddoc.lsp loaded ***")
and let us know what happened.
HTH
Henrique
I used (princ "\n*** My acaddoc.lsp loaded *** ") and that shows up when SDI=0 but not SDI=1
do I need to change it to (alert "*** My acaddoc.lsp loaded ***") I'm assuming it serves the same purpose.
Thanks
Dennis
@acade2012 wrote:
I used (princ "\n*** My acaddoc.lsp loaded *** ") and that shows up when SDI=0 but not SDI=1
do I need to change it to (alert "*** My acaddoc.lsp loaded ***") I'm assuming it serves the same purpose.
Thanks
Dennis
Dennis,
I saw that you had the *** My acaddoc.lsp loaded *** at your acaddoc.lsp, the purpose is the same but the result is different, is not dependent on the command line echo...
Henrique
OK this is weird!!! When I type in that alert and reboot ACADE I get a popup box with the alert that I have to close 2 times. In SDI=0 I get the alert box with each drawing I open. Then in SDI=1 I get the same shown below
Opening an AutoCAD 2007/LT 2007 format file.
Regenerating model.
Command:
Command:
Command:
Now the weird part. When I was modifying the ACADDOC.LSP I put a ; (semicolon) in front of all but the line to zoom to extents and the alert line. In doing that I mistakenly put the following in
(;setvar "SDI" 1)... then semicolon in the wrong place
The ACADDOC.LSP now runs the extents but not the alert and I get the following
Command: ; error: no function definition: C:WD_GETENV
Opening an AutoCAD 2007/LT 2007 format file.
Regenerating model.
Command:
Command:
Command: ._zoom
Specify corner of window, enter a scale factor (nX or nXP), or
[All/Center/Dynamic/Extents/Previous/Scale/Window/Object] <real time>: _extents
Command: ._zoom
Specify corner of window, enter a scale factor (nX or nXP), or
[All/Center/Dynamic/Extents/Previous/Scale/Window/Object] <real time>: _extents
Command: ; error: malformed list on input
AutoCAD menu utilities loaded.._zoom
Specify corner of window, enter a scale factor (nX or nXP), or
[All/Center/Dynamic/Extents/Previous/Scale/Window/Object] <real time>: _extents
Command: malformed list on input
not sure what that is doing.
Attached is the ACADDOC.LSP
ANY help is greatly appreciated.
Thanks
Dennis
Have you modified the acad.lsp / acad20##.lsp / acad20##doc.lsp files in any way?
Try using the following in your acaddoc.lsp (untested):
(defun mystartup ( ) (foreach sys '( (cmdecho 0) (hpname "SOLID") (navbardisplay 0) (orthomode 1) (gridmode 0) (osmode 15287) (autosnap 23) (snapmode 1) (snapunit (0.0625 0.0625)) (sdi 1) ) (if (getvar (car sys)) (apply 'setvar sys)) ) (command "_.navvcube" "_off" "._zoom" "_extents" ) (princ) ) (if s::startup (setq s::startup (append s::startup '((mystartup)))) (defun-q s::startup ( ) (mystartup)) ) (alert "My acaddoc.lsp loaded.") (princ)
I have modified the ACAD.LSP but have not touched the others. Attached is the ACAD,LSP
In testing the ACADDOC.LSP you supplied I get the same results ...works with SDI=0 but not in SDI=1
Thanks
Dennis
Are you using vanilla AutoCAD or one of the verticals? And is there a defined requirement to operate in SDI mode?
So this is AutoCAD Electrical then? And does it require you to use SDI mode?
ok I GIVE UP!!!
Now both my ACADDOC.LSP and the one Lee provided are partially working after a computer reboot with the following:
Command:
Opening an AutoCAD 2007/LT 2007 format file.
Regenerating model.
Command:
Command:
Command: ._zoom
Specify corner of window, enter a scale factor (nX or nXP), or
[All/Center/Dynamic/Extents/Previous/Scale/Window/Object] <real time>: _extents
Command: ; error: LOAD failed: "C:/LSP/ACAD.LSP"
and once again after an ACADE restart the ACADDOC.LSP is not working
Yes this is ACAD Electrical....Sorry should have said that up front.
No it does not require SDI to = 1 but that's what I prefer. That way it saves the drawing each time I exit a drawing.
@acade2012 wrote:I have modified the ACAD.LSP but have not touched the others. Attached is the ACAD,LSP
Firstly, you do not need to load the acaddoc.lsp from the acad.lsp - the acaddoc.lsp will be loaded automatically by AutoCAD. This is the reason that you have to close the dialog twice.
It looks as though the acad.lsp is performing the same operations as the acaddoc.lsp; this is not necessary and so I would recommend that you delete your acad.lsp file (it is not required by the system and it is redundant for your purposes since the acaddoc.lsp is performing the same operations).
@acade2012 wrote:
Command: ; error: LOAD failed: "C:/LSP/ACAD.LSP"
Since neither your acad.lsp nor acaddoc.lsp contain a load expression to load this file, do you have any other customisations loading on startup which could be causing this error?
Im have no other customizations loading that I know of. Where would I look?
I deleted the ACAD.LSP with no help to my issue
@acade2012 wrote:Im have no other customizations loading that I know of. Where would I look?
Check the Startup Suite.
Check that there are no other acad.lsp / acaddoc.lsp files on your system.
There are no other ACAD.LSP or ACADDOC.LSP on the system per a search of my computer and network.
I cleaned out the startup suite but there are still some grayed out items that I cannot delete.
There is a file ACAD.MNL and ACADE.MNL in the suite but I am assuming this are for loading the commands and are needed.
I tried changing the name of the ACADE.MNL to remove it from the suite. It removed it but when I restarted ACADE I had not projects and none of the electrical command worked as I would have expected BUT the ACADOC.LSP did work.
Any other ideas???
Do I need to reinstall ACADE at this [point???
I don't use AutoCAD Electrical, but if the acade.mnl file is required by the system (which it sounds like it is judging by your description), then I wouldn't remove it.
After removing the customisations from the startup suite (except those required by the system), do you still receive an error when opening a drawing?
Lee