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

acad2012doc.lsp not loading in some drawings

5 REPLIES 5
Reply
Message 1 of 6
mpeace
689 Views, 5 Replies

acad2012doc.lsp not loading in some drawings

I have an issue that has been driving me insane for days now. We run Autocad 2012 in SDI mode 0. our acad2012doc.lsp file typically loads in each drawing. However we have some drawings that when opned, does not load acad2012doc.lsp. It does not matter if the buggy drawings are opened first or fifth, the result is that same. The acad2012doc.lsp is not loaded. I get no error messages or indication as to why. Im on my knees begging for help. Can anyone help me figure this out? I'm not ultra proficent in programing or LISP so try to use smaller words. :o) I can send the drawings and anyhting else you may need or want to see to help me.

 

Anothe odd symptom is that every time we open the first drawing, we get a blank drawing open also. For example if we use Windows Explored to browse to a drawing on our network, double click to open it, we get both a blank drawing, and the drawing we wanted to open. I don't know if this related or not.

5 REPLIES 5
Message 2 of 6
Alfred.NESWADBA
in reply to: mpeace

Hi,

 

>> The acad2012doc.lsp is not loaded

Have you modified it? Then you should know you should not modify the ACAD####DOC.LSP (whereas the #### stands for the AutoCAD version number). To be read >>>here<<< (scroll down to the warning in the middle of the page).

 

Instead you should use the ACADDOC.LSP. The question that follows now: same problem if you do your modifications in that file?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 6
mpeace
in reply to: Alfred.NESWADBA

Well, yes it is modified. I have been simply porting forward the configurations that my predecessors had done. Clearly he made some errors. I have now separated out our custom section of the acad2012doc.lsp into the acaddoc.lsp file.

 

I have also discovered the problem, although I do no fully understand why it was a problem. I made some additions to our custom entry and was loading some lisp files incorrectly. I assumed it was the changes I made that was causing the issue but could not figure out why. I think it has to do with the way the lisp routines are written. For example in our custom section of the acad2012doc.lsp file I had the following:

 

(autoload "o" '("open"))

 

That did not work, I believe because of the programming that is contained in the "open.lsp" file.

 

I had to use the following:

 

(load "open.lsp")

 

Attached is the lisp file I was loading. I suspect it is because of the "vla-........" functions. I know nothing about those and had a lot of help assembling the code for this and a couple of other routines. Unfortunately it looks like I failed to add the credit to all of the people who helped me.

 

In any case our system is back running smoothly again.

 

Thank you Alfred for your help and educating me on the preferred practices.

Message 4 of 6
hmsilva
in reply to: mpeace

mpeace,

in the acaddoc.lsp file add

 

(vl-load-com);Loads Visual LISP extensions to AutoLISP

(autoload "open" '("o")); filename and command, the lisp file must be in a  Support File Search Path directory

 

hope that helps

Henrique

EESignature

Message 5 of 6
mpeace
in reply to: mpeace

Henrique,

I assume what you are saying here is that the Visual LISP extensions need to be loaded first,using the (vl-load-com) then the lisp files that use those extensions can be loaded. Is that correct?

Message 6 of 6
hmsilva
in reply to: mpeace

mpeace,

(vl-load-com) need to be loaded  only once for a section, if you place in the acaddoc.lsp is loaded automatically and don't have to load on each code,

 

what I was saying, it was that the

 

(autoload "o" '("open"))

"That did not work, I believe because ..."

 

the autoload was not well written, should be

 

(autoload "open" '("o")); filename and command, the lisp file must be in a  Support File Search Path directory

 

Henrique

EESignature

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

Post to forums  

Autodesk Design & Make Report

”Boost