I automatically set variables in AutoCAD, Here’s what I Used

I wanted to share a quick tip for AutoCAD that can save you a lot of time, especially when you’re dealing with multiple drawings. Recently, I was working on a project where I had to create PDFs of my drawings. I noticed that each PDF had a frame around the inserted images, which I had to manually turn off in each drawing using the FRAME command. This was quite tedious.

To automate this, you can create a simple AutoLISP named ACADDOC file that AutoCAD will run each time you open a drawing. Here’s how you can do it:

  1. Create a new text document and save it with a name ACADDOC and a .lsp extension.
  2. Inside this file, write a command to set the FRAME system variable to 0, which turns off the image frames. It looks something like this:
    (setvar "FRAME" 0)
  3. Save and close the file.
  4. In AutoCAD, go to Options > Files > Support File Search Path, and add the folder where you saved your LISP file.

Now, every time you open a drawing, this script will automatically run and turn off the image frames for you. This trick can also be used to set other system variables or automate repetitive tasks, making your workflow much more efficient.

If you want to see all of our command macros in one place, check out our Patreon group. 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top