A little embarrassed to pose this question.
I have an ACAD.lsp file, & only want it to load when ACAD starts. ACADLSPASDOC is set to 0. What is happening is ACAD.lsp is loading on startup as req'd, on first drawing. It is also loading on the next drawing started, but does not load on any other new drawings.
Can't seem to stop it reloading on second drawing.
Any suggestions.
W7
ACAD 2012 SP2 64 bit.
Ray C.
Solved! Go to Solution.
Solved by SRayC. Go to Solution.
Have you shut down and restart so the registry can do its work?
or
REGEDIT and see if it did change the setting
I am hoping my answer will be sufficient. I haven't worked with my setup in about 4 years.
The routine used:
(defun S::STARTUP()
(setvar "DIMASSOC" 2)
(command "edgemode" "1")
(command "taskbar" "0")
)
(load "MetricUnits")
(load "ImperialUnits")
(load "ArchUnits")
(load "chain")
(load "grabbar")
(load "bracket")
(load "fz")
(load "ze")
(load "atp")
(load "Angle")
(load "STBrk")
(load "chl")
(load "weld")
(princ)
If I remember correctly, I would put this in my Support folder: C:\Program Files\Autodesk\AutoCAD 2014\Support
Everything you see after the word "load", i.e. bracket, fz, ze, Angle are all lisp routines, others either helped me with or I created. In your case, remove the program names, and insert the routines you have in their place. Load "yourprogramname" and save this to you support folder. As autocad already loads what is in that folder, your programs should load everytime autocad is started, and your commands should be ready to go. As for what is at thge top, Dimassoc 2 is having all dimensions associative. Edgemode 1 is to have lines Extends or trims the selected object to an imaginary extension of the cutting or boundary edge and Taskbar 0: To display the drawings separately, enter 1 (Windows 7 default). Move the cursor over the Taskbar button to display a preview image of each open drawing.
I am pretty sure this is the way I had things loaded at a previous company.
HullDrafter
The defun should be S : : Startup just all squeezed together, not the frustrated face.
@HullDrafter wrote:
The defun should be S : : Startup just all squeezed together, not the frustrated face.
[See this thread for instructions to disable emoticons, so you'll never see that frustrated face again when you're signed in.]
FYI
Do you mean the "acad.lsp" shipped from AutoCAD?
If yes, don't touch it. If I remember correctly, AutoCAD may update/modify "acad.lsp" anytime.
It's better to use "acaddoc.lsp". It is for users loading their own settings.
Or you can create your own "acaddoc.lsp" and locate it in a support file search path (SFSP).
HTH
@BeKirra wrote:FYI
Do you mean the "acad.lsp" shipped from AutoCAD?
If yes, don't touch it. If I remember correctly, AutoCAD may update/modify "acad.lsp" anytime.
It's better to use "acaddoc.lsp". It is for users loading their own settings.
Or you can create your own "acaddoc.lsp" and locate it in a support file search path (SFSP).
HTH
Not quite correct.
acad2014.lsp (or whichever number) and acaddoc2014.lsp are the files only intended for Autodesk use. Both acad.lsp and acaddoc.lsp are intended for the user's own configuration stuff.
(they may not exist, if not, you are free to create them.)
[On AutoCAD Mechanical there is also some Autodesk stuff in acaddoc.lsp, so that should probably be added to any alternative version, too.]
--
All
I have restarted many times. Checked the registry and all is good.
I have found that this only happens when starting ACAD via a shortcut that has a command line switch /P, starting with a profile. It is not specific to a certain profile.
My investigation continues.
Any and all suggestions ar helpful.
Ray C.
Resolved
Issue was the acad.lsp had a line of code (command "-vbaload" "somemacro")
Subsituted it with (vl-vbaload "somemacro")
Don't know why it makes a difference but it did.
I know, I've got to get rid of VBA stuff. Working on it. Too much legacy stuff!!!
Ray C.