Display full version of the post: Syntax of file acad.lsp

grdruck
08.07.2010, 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

kybluelex
08.07.2010, 15:27
I your ACAD.LSP file
(SETVAR "UCSICON" 0);;    Turn the UCS Icon OFF
 
 
 

Cad64
09.07.2010, 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. 

kybluelex
09.07.2010, 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.

Cad64
09.07.2010, 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

grdruck
13.07.2010, 19:59
Thanks for all your help!

p3.1416l
01.09.2010, 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