CAD Automation

How to Automate Repetitive CAD Tasks

There are four levels of tools for automating CAD work, from built-in features to full add-ins. Choosing the right level saves both time and budget.

Level 1: Use built-in features properly

Before writing code, make sure you are using what the CAD software already offers: templates, dynamic blocks and tool palettes in AutoCAD, design tables and configurations in SOLIDWORKS, iParts and iAssemblies in Inventor, families and view templates in Revit. Well-built templates alone can remove a surprising amount of repetition.

Level 2: Macros and scripts

Scripts automate sequences of commands. They are quick to write and great for individual tasks.

AutoLISP example: set standard layers in any drawing.

(defun c:STDLAYERS ()
  (foreach lay '(("DIM" 1) ("TEXT" 7) ("HIDDEN" 8) ("CENTER" 4))
    (if (not (tblsearch "LAYER" (car lay)))
      (command "_.-LAYER" "_M" (car lay) "_C" (cadr lay) "" "")
    )
  )
  (princ "\nStandard layers created.")
  (princ)
)

Inventor iLogic example: fill a property from parameters.

iProperties.Value("Project", "Description") = _
    "PLATE " & Parameter("Length") & " x " & Parameter("Width") & " x " & Parameter("Thickness")

Level 3: Add-ins

When a task is used by many people, needs a proper interface or connects to other systems, build an add-in in C# or C++. Add-ins provide ribbon buttons, dialogs, error handling, logging and professional deployment.

Level 4: Batch and unattended automation

For large volumes, standalone tools process folders of files without user interaction: exports, property updates, validations or conversions. Cloud services such as Autodesk Platform Services Design Automation can run AutoCAD, Inventor and Revit processing on servers.

Choosing the right level

SituationRecommended level
Task done by one person, simple stepsLevel 1 or 2
Team-wide task, needs inputs and UILevel 3
Hundreds of files, no user decisionsLevel 4
Critical business process with integrationsLevel 3 + 4

Tips for success

  • Record the manual steps precisely before automating.
  • Test on copies of real files, including old and messy ones.
  • Keep scripts in version control, not on one person's desktop.
  • Document how to use and update each tool.
Automate the boring parts first. Quick wins build support for bigger projects.

Need help automating?

ENGIMANDI writes scripts, add-ins and batch tools for AutoCAD, Inventor, SolidWorks, Revit and more.

EM
ENGIMANDI CAD Team

We build CAD add-ins, automation and integrations for engineering and manufacturing companies worldwide.