• Home
  • Training Books
  • Subscribe to Our Email Newsletter
  • About
    • Contributors
    • Feedback
    • Contact
    • Privacy policy
    • Cookie Policy

CADnotes

CAD Tutorials and Best Practices for professionals and students

  • Featured
  • AutoCAD
    • AutoLISP
  • Revit
    • Revit Architecture Basic
    • Revit MEP Basic Tutorial
  • Inventor
  • MicroStation
    • MicroStation Basic Tutorial
  • CADnotes on YouTube
You are here: Home / AutoCAD / Set default system variables in acaddoc.lsp

Set default system variables in acaddoc.lsp

January 24, 2012 by Edwin Prakoso 1 Comment

In this Article...

  • What can we do with acaddoc.lsp?
  • Common unexpected system variables change
  • We can force to set the variables in acaddoc.lsp
  • What system variables do you find change often?

We covered about acaddoc.lsp in AutoLISP tutorial. Acaddoc.lsp will execute commands defined in it, every time AutoCAD open a file.

acaddoc

What can we do with acaddoc.lsp?

Now if you know you can run commands automatically when you open a file, what would you do?

  1. You can load AutoLISP file automatically.
  2. You can define new command. In the tutorial, we redefine PLOT command to update datalink before AutoCAD starts to plot.
  3. You can run commands before you start working with your file.
  4. You can set system variable before you start working.

In this article, we are going to focus to the last one. I found that there are many users confused why their AutoCAD doesn’t work as usual. And they become regular questions. These are some samples of changed system variables.

Common unexpected system variables change

These are several common system variables that change regularly.

  1. File dialog box is missing. You have to type file path and file name from command line. It’s because FILEDIA system variable has changed.
  2. AutoCAD default noun-verb selection becomes verb-noun selection. It’s because PICKFIRST system variable has changed.
  3. Single document interface is activated. It’s controlled by SDI system variable.
  4. And more…

There is a debate why they changed. Most people think that it was because routines in AutoLISP or other 3rd party applications. I used to be agree with it, until I saw this problem also happens in AutoCAD LT. So it remains a mystery to me.

We can force to set the variables in acaddoc.lsp

Harold Reuvers reminds me that we can set those variables in acaddoc.lsp. I prefer to backup my system variables and restore them when I have problem. We can’t remember all the variables, right?

However, if you have specific system variable that changes often, this is a good solution.

All you need is to create an acaddoc.lsp using notepad or visual LISP editor.

Just type these code:

(SETVAR "PICKFIRST" 1)

Feel free to add more lines or change system variables and values as you preferred.

If you want to learn how to use Visual LISP editor, see this basic AutoLISP tutorial.

What system variables do you find change often?

Do you find system variables in your AutoCAD change often? What are they?

About Edwin Prakoso

I work as a Solution Consultant in Datech Solutions, Tech Data Indonesia. I've been using AutoCAD since R14 and Revit since Revit Building 9. I occasionally write for AUGIWorld magazine and I am also active in Autodesk discussion forum. I'm a member of Autodesk Expert Elite, an appreciation for individuals who give contributions to the Autodesk community.
Connect with me on twitter or LinkedIn. If you want to have my new articles sent to your email inbox, you can subscribe to the newsletter.

Filed Under: AutoCAD, AutoLISP Tagged With: acaddoc.lsp, autocad tips, filedia, pickfirst

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Comment
Inline Feedbacks
View all comments
DrCADD
DrCADD
10 years ago

AutoCAD 2013 System Variables Lookup Chart

0
Reply
wpdiscuz   wpDiscuz
Join Our Free Email Newsletter
  Thank you for Signing Up
Please correct the marked field(s) below.
1,true,6,Contact Email,2 1,false,1,First Name,2 1,false,1,Last Name,2

Featured

best training

The Best, the Rest, the Rare: 100 AutoCAD Tips You Should Know

A compilation of AutoCAD tips. Read all 100 of them to increase your productivity!

Recent Articles

  • Revit 2024.1 Update is Released
  • What’s New in Revit 2024: Bending Detail
  • What’s New in Revit 2024: The Dark Theme

Advertisement

New on CADnotes

  • Revit 2024.1 Update is Released
  • What’s New in Revit 2024: Bending Detail
  • What’s New in Revit 2024: The Dark Theme
  • Autodesk Build: Using Assets for Progress Tracking
  • My Home on the ACC Unified Platform

Meet the Authors

avatar for
avatar for
avatar for
avatar for
avatar for
avatar for

Get Connected

CADnotes on FacebookCADnotes on InstagramCADnotes on TwitterCADnotes on YouTube

© 2009 – 2023 CADnotes · Feedback · Privacy Policy · Become an affiliate

wpDiscuz