Jump to content

Recommended Posts

Posted

Hello.

I am using an old acad.lsp file with custom modified commands.

After years of using it without any problems, it suddenly stopped working.

This happened on two different computers with different versions of autocad (17 and 18) and without any software or windows updates.

AutoCAD prompted me to change "command" to "command-s" in the lisp file and it resumed working.

The problem now is that whenever i open a .dwg file it keeps asking me if i want to save the file on c: drive.

I would like this to stop. Does anybody know if this is a lisp file issue and how to solve it?

Posted

Could be a lot of things... can you post a copy of the offending routine? (old and new version too perhaps?)

  • Like 2
Posted

As newer file formats can have larger file sizes opening and modifying them from a floppy, CD or USB might prompt to save it on another drive.

As Steven pointed out we'd need to see the acad.lsp if you think that's causing your issue. For it to happen every time you open a drawing your ACADLSPASDOC must be set to 1.

Are you using acaddoc.lsp as well?

Are you using Startup Suite?

About Auto-Loading and Running AutoLISP Routines

  • Like 1
Posted

Thank you for responding so fast.

 

This happens when i am opening a file either from c:\ or from an external hard drive.

 

Yes, i am using acaddoc.lsp and startup suite as well. Applications running on startup suite are DDEDT.lsp and RECENT.VLX

 

If this is of any help, ACADLSPASDOC is indeed set to 1.

 

I am uploading the lsp files in question.

ACAD.LSP ACADDOC.LSP DDEDT.lsp RECENT.VLX

Posted

Looks like a messy pile of outdated "\nComputer Drafting System Set Up in Feb.1990" code. What are DDEDT.lsp & RECENT.VLX needed for?

Editing text, mtext, and dimensions are pretty easy now.

 

I would never use compiled code because it turning out to be malicious likely ends in being unemployed.

What is the environmental variable "EXEMGM" for and are sure you've added it somewhere it's not the same as setvar. You're missing a space in (setenv"EXEMGM" "512") between setenv & "EXEMGM".

With all the functions defined in acad.lsp you must have set ACADLSPASDOC to 1 making it load every time like acaddoc.lsp and you still use both?

My acad.lsp only runs when I open AutoCAD and my acaddoc.lsp runs every time I open a drawing as AutoCAD intended.

  • Like 2
Posted (edited)

I would pull all your custom code out of the acad.lsp and load via Start up suite.

 

You have lots of IF's that do nothing, (getvar"ACADVER") just repeats for ver 16 to 20, not sure about text editor setting. 

Note if running in non Acad like Bricscad.

((getvar"ACADVER")
"22.0 BricsCAD"

 

If your runing 2017&18 then all the ifs are redundant just remove not sure why even checking just set editor. 2017=21 2018=22 very old now. 

 

Lots of weird code just runs not in defuns.

(setq a:&% chr)

(setq replace close) ; define close

(setq reach open) ;define open

(setq reading "r") ; define read

 

(setq xd "c:/"
    xc "c:/Dos/XC.eXE" 
    gm "c:/Dos/ID.Com")

 

and this (load "c:\\cad\\time.con")

Found this (prompt "\nComputer Drafting System Set Up in Feb.1990")

 

It looks to me like it is time to have a good look at what it is all doing. Make custom lsp and just put 1 function at a time and test. Should not need s::startup function.

 

Edited by BIGAL
  • Like 3
Posted
9 hours ago, BIGAL said:

It looks to me like it is time to have a good look at what it is all doing. Make custom lsp and just put 1 function at a time and test. Should not need s::startup function.

 

I didn't have time to look at this yesterday but that was my thought too, about 60kb of LISPs and quite a lot can be removed and tidied up, which might solve your problems when you do - quite a task though. 

  • Like 2
Posted

Thank you for all the answers, they are actually really helpful. 

 

Seems like it is time to move on from that old patchwork of a code and make a new lisp from scratch, nice and clean.

 

Cheers.

  • Like 2
Posted
11 hours ago, Mars said:

Thank you for all the answers, they are actually really helpful. 

 

Seems like it is time to move on from that old patchwork of a code and make a new lisp from scratch, nice and clean.

 

Cheers.

 

If you need help of course, just ask

 

I'd maybe comment out all the old code and see what parts of it you miss? Add it back in again and see how that goes as a start

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...