lamensterms Posted July 15, 2021 Posted July 15, 2021 Hey, I've just changed jobs, and the new office runs ACAD 2017, on Windows 10. As usual with new OS and ACAD, I'm finding a few issues to troubleshoot.... one of which is an annoying (understatement) issue which crashes ACAD, caused by aeccore.crx. I've found that if I can force aeccore.crx to initiate at the beginning of a session, all is OK. If I have had the session open for a little while, then initiate aeccore.crx... crash. So... I would like to load and run a routine that will force aeccore.crx to initiate at the beginning of the session, and not when I open each drawing. Is this possible? Thanks for any help Quote
BIGAL Posted July 15, 2021 Posted July 15, 2021 Did you try a load in a lisp that you have added using Appload add to Startup suite. This loads on startup lisps. Quote
lamensterms Posted July 16, 2021 Author Posted July 16, 2021 Thanks for the reply BIGAL. Is it correct that the Startup Suite will load for every drawing? I only wish to load a particular lisp at session start (and not load for each DWG) Quote
BIGAL Posted July 16, 2021 Posted July 16, 2021 Not sure there is documentation about startup programs and how they are loaded. Ned to Google. Quote
Dadgad Posted July 16, 2021 Posted July 16, 2021 I just reread your initial post, sounds like you want to set it to 2, like I do. 1 Quote
Steven P Posted July 16, 2021 Posted July 16, 2021 I'd make this into a LISP with a global string, if string is nil then do what you want at first opening CAD. After that is defined run the command in the LISP and set the file to load at startup LISP might be (untested): (defun c:loadaeccore ( / ) (if (= aeccoreloaded nil) (progn --DO WHATEVER YOU WANT AT INITIAL STATUP HERE-- (setq aeccoreloaded "Loaded") ) ;;end progn } ;;end if (princ aeccoreloaded) (princ) ) (c:loadaeccore) 1 Quote
tombu Posted July 16, 2021 Posted July 16, 2021 Why not just load it with acad.lsp? As long as ACADLSPASDOC (System Variable) is set to it's initial value of 0 acad.lsp only loads when the first drawing is opened in a session. Don't use acaddoc.lsp to load it as it would load every time a drawing is opened which works well for most lisp routines. 3 Quote
Dadgad Posted July 19, 2021 Posted July 19, 2021 @tombu nailed it, there is much to be said for consistency. I just stumbled across this in the SYSVDLG, and was about to ammend my earlier suggestion. Here is the screenshot. 1 Quote
lamensterms Posted July 19, 2021 Author Posted July 19, 2021 Thanks for the replies guys. @Dadgad I'll do some reading about that sysvar... not sure if that will effect my LISP loading - I'll check it out. Definately ACADLSPASDOC could be the go! @Steven P Good suggestion for a quick work-around. I've gone with this solution for now, though I used : (setenv "aeccoreloaded" "Loaded") @tombu I think this is exactly what I was looking for, thank you! Thanks guys 1 Quote
Dadgad Posted July 19, 2021 Posted July 19, 2021 SYSVDLG just opens the Pandora's Box of all Autocad commands, and explains all available options. It is a quick trip into the belly of the System Variables Beast. I favor cursor scrolling through any area that might seem to be of interest, because then the dialog box opens, providing a very quick, on the fly review of what the variable does. Spend some down time going through it, you'll learn plenty, and be glad you did. 1 Quote
Steven P Posted July 19, 2021 Posted July 19, 2021 4 hours ago, lamensterms said: (setenv "aeccoreloaded" "Loaded") Won't saving 'Loaded' in the registry keep that value even when you close and restart AutoCAD, if you save it as a string it will clear when you restart AutoCAD 1 Quote
tombu Posted July 19, 2021 Posted July 19, 2021 Many elite coders avoid Express Tools because some still have bugs (most easily fixed by replacing "command" calls with "command-s") in them but Help for them has been included in AutoCAD help in recent versions and I've used them since they started out as Bonus Tools. Many of them have been added as regular AutoCAD commands (most of the Layer commands for example), others have been dropped, while others around longer than Bonus Tools like Getsel.lsp and SSX.lsp are still considered Express Tools. Like Dadgad I use SYSVDLG (System Variable Editor…) and ALIASEDIT (Command Alias Editor…) on a regular basis as they provide a quick, simple, and helpful interface that eliminates simple mistakes. While some system variables are persistent, some are saved in the drawing, and some aren't saved at all when a drawing is closed environmental variables are saved in the Windows Registry where they remain unchanged. Keep in mind environmental variables saved in profiles may be different after switching profiles. 2 Quote
lamensterms Posted July 25, 2021 Author Posted July 25, 2021 On 7/19/2021 at 6:06 PM, Steven P said: Hi Steven, Dadgad & Tombu, Oh, right you are! I had found that using SETQ would only save the string in the current DWG. This would cause my 'AECCORELOAD' command to run each time I open a drawing - which I am hoping to avoid. Do you know of any other way to save a user variable for the current session? In the meantime I can use Tombu's solution (though I haven't tested yet). I too am very fond of SYSVDLG, use it regularly to read up on SYSVARs, but to my mild shame I haven't taken the time to commit much of it to memory! Maybe on a quiet Sunday afternoon or 2 (or 3), I'll spend some real time getting further acquainted with it Thanks again for your help everyone! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.