Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ACAD.lsp: Need some Help

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
SRayC
769 Views, 8 Replies

ACAD.lsp: Need some Help

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.

8 REPLIES 8
Message 2 of 9
Patchy
in reply to: SRayC

Have you shut down and restart so the registry can do its work?

or

REGEDIT and see if it did change the setting

Message 3 of 9
HullDrafter
in reply to: SRayC

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

Message 4 of 9
HullDrafter
in reply to: HullDrafter

The defun should be S : : Startup just all squeezed together, not the frustrated face.

Message 5 of 9
Kent1Cooper
in reply to: HullDrafter


@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.]

Kent Cooper, AIA
Message 6 of 9
BeKirra
in reply to: SRayC

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

Please mark "Accept as Solution" and "Like" if my reply resolves the issue and it will help when others need helps.
= ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ =
A circle is the locus of a cursor, starting and ending at the same point on a plane in model space or in layout such that its distance from a given coordinates (X,Y) is always constant.
X² + Y² = C²
Message 7 of 9
martti.halminen
in reply to: BeKirra


@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.]

 

--

Message 8 of 9
SRayC
in reply to: SRayC

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.

Message 9 of 9
SRayC
in reply to: SRayC

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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost