CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 17173
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

 

HelpCAD discussion

 
CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.

How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedSyntax of file acad.lsp

 Post Reply Post Reply
Author
grdruck View Drop Down
Newbie
Newbie


Joined: 08.Jul.2010
Location: United States
Using: AutoCAD2010
Status: Offline
Points: 4
Direct Link To This Post Topic: Syntax of file acad.lsp
    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
Back to Top
kybluelex View Drop Down
Newbie
Newbie


Joined: 11.Mar.2010
Location: United States
Using: AutoCAD2009
Status: Offline
Points: 2
Direct Link To This Post Posted: 08.Jul.2010 at 15:27

I your ACAD.LSP file

(SETVAR "UCSICON" 0);;    Turn the UCS Icon OFF
 
 
 
Back to Top
Cad64 View Drop Down
Senior Member
Senior Member


Joined: 17.Apr.2010
Location: United States
Using: Autocad 2011, 3DS Max 2011, Photoshop CS5
Status: Offline
Points: 491
Direct Link To This Post 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/
Back to Top
kybluelex View Drop Down
Newbie
Newbie


Joined: 11.Mar.2010
Location: United States
Using: AutoCAD2009
Status: Offline
Points: 2
Direct Link To This Post 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.
Back to Top
Cad64 View Drop Down
Senior Member
Senior Member


Joined: 17.Apr.2010
Location: United States
Using: Autocad 2011, 3DS Max 2011, Photoshop CS5
Status: Offline
Points: 491
Direct Link To This Post 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
Online Portfolio: http://www.rdeweese.com/
Back to Top
grdruck View Drop Down
Newbie
Newbie


Joined: 08.Jul.2010
Location: United States
Using: AutoCAD2010
Status: Offline
Points: 4
Direct Link To This Post Posted: 13.Jul.2010 at 19:59

Thanks for all your help!

Back to Top
p3.1416l View Drop Down
Groupie
Groupie


Joined: 27.Oct.2008
Location: Spain
Status: Offline
Points: 41
Direct Link To This Post 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
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,422 seconds.