Print Page | Close Window

Syntax of file acad.lsp

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=3970
Printed Date: 17.Apr.2026 at 17:22


Topic: Syntax of file acad.lsp
Posted By: grdruck
Subject: Syntax of file acad.lsp
Date Posted: 08.Jul.2010 at 04:41
Hi,
I have done this in the past with older versions of AutoCAD, but can't find my old acad.lsp files.
 
I would like to set a command to off when I open a new or existing autocad file.
 
The command is UCSICON
 
Can this still be done with 2010?  If so can someone help me with the Syntax.
 
Thanks



Replies:
Posted By: kybluelex
Date Posted: 08.Jul.2010 at 15:27

I your ACAD.LSP file

(SETVAR "UCSICON" 0);;    Turn the UCS Icon OFF
 
 
 


Posted By: Cad64
Date Posted: 09.Jul.2010 at 01:11
In my opinion, it's not a good idea to edit the acad.lsp file, or any other standard Autocad files. The reason is, if you have to run a repair, re-install or upgrade, the code you add to these files will be lost.
 
Create an acaddoc.lsp file and put your custom code in there. You can put the acaddoc.lsp file in the same folder as the acad.lsp and it will run every time you open a drawing. This file will not be affected if you have to run a Repair, and if you have to Reinstall or Upgrade, simply copy and paste a backup copy of your acaddoc.lsp into the proper folder and you're set. 


-------------
Online Portfolio: http://www.rdeweese.com/" rel="nofollow - http://www.rdeweese.com/


Posted By: kybluelex
Date Posted: 09.Jul.2010 at 14:15
True, you may lose the file IF you do not keep a copy outside of the standard AutoCAD file structure. Also the ACAD .LSP file is NOT a standard file that comes with AutoCAD, you, at some point, create the file for your use. I have the same file, with changes (which happens very often), that I created while using R9. Just keep a copy.... just like if you use acaddoc.lsp.


Posted By: Cad64
Date Posted: 09.Jul.2010 at 16:43
Ok, I was thinking of the acadxxxx.lsp, (Replace xxxx with your version). But there are other issues with the acad.lsp that make the acaddoc.lsp more useful, in my opinion. http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=2897258&linkID=9240617" rel="nofollow - http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=2897258&linkID=9240617

-------------
Online Portfolio: http://www.rdeweese.com/" rel="nofollow - http://www.rdeweese.com/


Posted By: grdruck
Date Posted: 13.Jul.2010 at 19:59

Thanks for all your help!



Posted By: p3.1416l
Date Posted: 01.Sep.2010 at 01:17
Only a small clarification:
-acad.lsp is executed only once per sesion of AutoCAD.
-acaddoc.lsp is executed when you start AutoCAD and every time you start or open a new drawing.
 
By the other hand, you can also create your custom StartUp.lsp where you define S::Startup and control ucs icon and other environment aspects. In practice it's the same as the other archives described by kybluelex and Cad64


-------------
Less is more



Print Page | Close Window