Guide · CAD Automation

AutoCAD Automation

AutoLISP, Plugins and Bundles — A Complete Guide

What AutoLISP is, when to move to .NET, and how to package and ship a plugin to a team — every layer of AutoCAD automation on one page.

AutoLISPVisual LISP.NET / ObjectARXBundleBatch Processing
In This Article

AutoCAD automation means having AutoCAD do repetitive drawing work on command from code. It has three layers: AutoLISP for quick commands and routines, .NET (ObjectARX) for versioned plugins with a real interface, and Autodesk's .bundle package format for shipping those plugins without an installer.

01 / 05

What is AutoCAD automation?

Setting up the layer standard by hand in every drawing, filling attributes one at a time, opening hundreds of DWGs to print them to PDF — most of the time spent in AutoCAD goes to work like this. Automation means having AutoCAD's own command line and object model do it from code.

AutoCAD exposes more than one surface for automation. The lowest-threshold one is AutoLISP: a language that ships inside AutoCAD, needs no separate compiler, and lives in a plain text file. For larger work, the .NET API and ObjectARX take over.

02 / 05

AutoLISP or .NET? A decision table

AutoLISP / Visual LISP.NET (C# / VB.NET)Script (.scr)
File.lsp plain textCompiled .dll.scr command list
CompilationNot neededVisual Studio requiredNot needed
InterfaceSimple DCL dialogPalette, ribbon tab, WPFNone
Object accessDrawing entities, command lineFull object model and databaseCommands only
Use it whenShortcut commands, daily routinesProducts, team plugins, complex logicFixed-order batch work
DeploymentStartup Suite, acaddoc.lsp.bundle packageRun manually

AutoLISP's biggest advantage is its low threshold: a text editor and AutoCAD are enough, and you can try the line you just wrote immediately. Moving to .NET costs you an install and a build chain; in return you get a real interface, version control, and much faster code.

03 / 05

How do you package an AutoCAD plugin? (.bundle)

The Autodesk Application Plugin Bundle — deployment without the registry or an installer.

The cleanest way to ship a plugin to a team is Autodesk's bundle format. A bundle is an ordinary folder whose name ends in .bundle; inside it sits a PackageContents.xml describing what the plugin is and how to load it, plus a Contents folder holding the files.

Copy that folder into AutoCAD's ApplicationPlugins directory and the plugin is picked up on its own: no registry writes, no installer to build, no asking users to run APPLOAD. Removing it is just as simple — delete the folder.

  • PackageContents.xml declares the plugin's name, version, author, and which AutoCAD releases it supports
  • One bundle can carry several components at once: .lsp routines, .NET assemblies, menu and ribbon definitions
  • Declaring a version range lets a single package serve multiple AutoCAD releases
  • It can be deployed by copying from a shared network folder or through group policy
04 / 05

What can you automate in AutoCAD?

  • Setting up the layer, linetype and text style standard in one command
  • Filling and exporting attribute fields in bulk
  • Batch PDF, DXF or version conversion across every DWG in a folder
  • Writing title block and sheet data automatically from project data
  • Drawing cleanup: purging unused blocks, layers and styles
  • Extracting dimension, area and count reports from the drawing into a table
05 / 05

From routine to product: how to set the project up

Frequently Asked

What is AutoLISP?

AutoLISP is a programming language built into AutoCAD, used to automate drawing work. It needs no separate compiler; the code lives in a plain text file with a .lsp extension and runs as soon as it is loaded into AutoCAD.

How do you add a new command to AutoCAD?

In AutoLISP, any function defined with a C: prefix on its name becomes a command callable from the AutoCAD command line. Once the file is loaded with APPLOAD the command is available; to have it ready on every launch, use the Startup Suite or acaddoc.lsp.

What is an AutoCAD bundle?

A bundle is Autodesk's plugin packaging format: an ordinary folder whose name ends in .bundle, containing a PackageContents.xml manifest and a Contents folder. Copied into AutoCAD's ApplicationPlugins directory, the plugin is recognised without registry entries or an installer.

Should I use AutoLISP or .NET?

AutoLISP for shortcut commands and daily routines — the threshold is low and nothing needs compiling. .NET if you are building a versioned plugin with an interface that ships to a team. The two can coexist in the same installation, and most teams use both.

How do you load an AutoLISP file automatically at startup?

Two common routes: add the file to the Startup Suite, or load it from acaddoc.lsp. If a team shares a common folder, adding that folder to AutoCAD's support file search path gives everyone the same setup.

What can be automated in AutoCAD?

Setting up layer and style standards, bulk-filling attribute fields, batch PDF/DXF conversion of every DWG in a folder, writing title block data from project data, drawing cleanup, and extracting reports from a drawing into a table are the jobs most often automated.

How It Looks in Production