34 Free CAD Macros & API Scripts Download (AutoCAD, Revit, SolidWorks, Civil 3D)

Providing CAD Macros and API Scripts is the ultimate offering for the “Power User.” While blocks and templates provide the structure, macros and scripts provide the intelligence and speed.

These tools go beyond standard commands, using Python, VBA, C#, and .SCR files to manipulate the software’s backend (API) for heavy-duty automation.

This page adds what most lists miss: real-world usage, deployment tips, and production constraints.


What You’re Getting

  • AutoCAD scripts (.SCR) for batch execution
  • Macros (.MAC / VBA) for UI automation
  • API scripts (.PY / .CS) for deep automation
  • AutoLISP (.LSP) for logic-driven AutoCAD workflows

Supported platforms include:

  • AutoCAD
  • Revit
  • SolidWorks

Professional CAD Macros & API Scripts (.SCR, .PY, .VBA, .CS)

AutoCAD / General CAD Automation

Batch_PDF_Exporter_Pro.scr: A high-speed AutoCAD script that automates the plotting of hundreds of layouts to PDF with predefined naming conventions. Use case: run it overnight.
CAD Manager tip: execute it through accoreconsole.exe (AutoCAD Core Console) to process hundreds of drawings without opening the UI.

Layer_Zero_Standardizer.mac: A button macro that instantly moves all nested objects within blocks to Layer 0 and sets properties to “ByLayer.”

Excel_To_AutoCAD_Table_Sync.vba: A VBA script that establishes a live-link between Excel spreadsheets and AutoCAD tables for instant data synchronization.

Clean_DWG_Nuclear_Purge.mac: An aggressive cleanup macro that runs PURGE, AUDIT, -PURGE (Regapps), and deletes all ghost objects in one click.

Block_Attribute_Mass_Updater.scr: A batch script to find and replace specific attribute values across multiple DWG files without opening them manually.

Xref_Path_Fixer_Batch.mac: A specialized macro to instantly switch Xref paths from “Absolute” to “Relative” to prevent broken links during server migrations.

Automatic_TitleBlock_Updater.scr: Updates drawing titles, dates, and revision numbers across an entire project folder using a single script file.

Object_Transparency_Toggler.mac: A toggle macro for the status bar that instantly dims or brightens all hatches and transparent layers for better screen readability.

DWG_Metadata_Scraper.py: A standalone Python script using the ODA or AutoCAD API to extract file version, last saved by, and total edit time from a directory of drawings.

Batch_Unit_Converter.scr: Converts entire folders of drawings from Imperial (Inches) to Metric (MM) while adjusting dimension styles and LTSCALE.

Line_Type_Scale_Global_Sync.scr: Synchronizes CELTSCALE, LTSCALE, and PSLTSCALE across all layouts to ensure dashed lines look identical everywhere.

Text_To_MText_Converter_Batch.mac: A productivity macro that merges multiple single-line text objects into a single, formatted MText block.

Batch_Rename_Xrefs.scr: A script to rename Xref attachments with a specific prefix to avoid conflicts in a multi-firm coordination environment.

AutoCAD_Point_Cloud_Optimizer.mac: A macro that adjusts the point size and density display of RCP files for smoother navigation in 3D.

Total_Length_Calculator.mac: A fast macro that calculates the total combined length of all selected lines, polylines, and arcs (ideal for cabling or piping).


Revit / BIM Automation

Revit_Element_ID_Exporter.py: A Python API script (pyRevit compatible) that exports all element IDs and their parameters to a CSV for external database auditing.

Revit_View_Sheet_Generator.cs: A C# API script that automatically creates hundreds of sheets and places corresponding views based on a project browser list.

BIM_Parameter_Mass_Updater.py: A Revit API script that pushes specific data values to multiple categories simultaneously based on a mapping logic.

Revit_Model_Cleanup_Expert.py: A Python script that identifies and removes unused view templates, filters, and line styles that the standard “Purge Unused” misses.

Revit_Schedule_To_HTML.py: An API script that converts Revit schedules into interactive HTML tables for project dashboards or internal websites.

Revit_Family_Parameter_Purger.cs: A C# script that cleans up Revit families by deleting all non-standard shared parameters before they infect your project.

Revit_Warning_Dashboard_Exporter.py: Extracts all Revit warnings, categorizes them by severity, and generates an Excel report for BIM QC meetings.

Revit_Sheet_Coordinate_Check.py: Validates that all views on a sheet are correctly aligned to the project base point to avoid coordinate shifts.

Revit_Workset_Visibility_Manager.cs: A C# API tool that bulk-updates workset visibility across all View Templates in a project.


Civil 3D / GIS Automation

Auto_Coordinate_Labeler.py: A Python script for Civil 3D that extracts XYZ coordinates and places dynamic labels at specific intervals along a polyline.

Property_Set_Data_Exporter.py: A Civil 3D Python script that extracts extended Property Set Data from BIM objects for use in Navisworks or GIS.

CAD_To_GeoJSON_Converter.py: A Python script that converts AutoCAD polylines and points into GeoJSON format for web-based mapping applications.


SolidWorks Automation

SolidWorks_BOM_Exporter.swp: A SolidWorks VBA macro that extracts the Bill of Materials (BOM) and formats it into a production-ready Excel template.

SolidWorks_Part_Color_Coder.swp: Automatically assigns colors to SolidWorks parts based on their “Material” property for visual inventory checks.


Fusion 360 / MicroStation

Fusion360_Automatic_Fillet.py: A Python API script for Fusion 360 that automatically applies a specific radius fillet to all external edges of a selected body.

MicroStation_Level_Mapper.mvba: A VBA macro for MicroStation users to remap legacy levels to a new company-standard level structure.


Additional Productivity Tools

Excel_Layer_Controller.vba: An Excel macro that allows you to turn layers ON/OFF in an open AutoCAD drawing directly from your spreadsheet.

Automatic_Hatch_Area_Calculator.mac: A macro that selects all hatches of a certain pattern and displays the total accumulated area in a popup alert.

Automatic_Revision_Cloud_Stamper.mac: A macro that draws a revision cloud around a selection and automatically attaches the current date as a tag.


Script vs Macro vs LISP vs API

  • Macros (.mac) → User Interface (buttons and shortcuts)
  • Scripts (.scr) → Command Line (batch processing)
  • API Scripts (.py / .cs) → software logic and data
  • AutoLISP (.lsp) → adds decision-making (if/then), unlike .SCR

Advanced CAD Manager Notes

AutoCAD Core Console

Use accoreconsole.exe for heavy batch operations. Faster, no UI, more stable on large datasets.


ScriptPro (Autodesk)

Recommended tool to apply one script to hundreds of drawings automatically. Standard in large CAD environments.


Hard-Coded Paths Warning

Avoid scripts with fixed paths like: C:\Users\Admin\Documents

Use:

  • relative paths
  • environment variables like %USERPROFILE%

Python in Revit (Version Gap)

  • pyRevit standard: IronPython 2.7
  • Revit 2025+: transition to CPython 3

Older scripts may need syntax updates.


Error Handling

API scripts include:

  • try/except (Python)
  • try/catch (C#)

Prevents crashes when elements are locked or missing.


AI Adjustment Tip

You can paste these scripts into ChatGPT or Claude to:

  • rename layers
  • change parameters
  • adapt naming conventions

Security Note

Advise users to always unblock downloaded files (Right-click > Properties > Unblock).

If blocked:

  • Revit may not load the plugin
  • Python/C# scripts may fail with Target Invocation errors

Always test first.


FAQ

What is a CAD macro?

A macro automates repetitive CAD commands.


What is the difference between script and API?

Scripts run commands. APIs interact with the model logic.


What about LISP?

LISP allows logic. Scripts do not.


Why is my macro button greyed out?

Usually:

  • VBA security restriction
  • missing references
  • macro not loaded

Can I run these on AutoCAD LT?

No. AutoCAD LT does not support VBA, LISP, or full API tools (limited LISP only in recent versions).


Are these scripts safe?

Yes, if tested first in a controlled environment.


Do I need programming skills?

No for basic use. Yes for customization.


Final Field Note

If you’re still doing repetitive CAD tasks manually, you’re losing time.

Start with scripts. Move to LISP. Use APIs when needed.

That’s how production teams scale without adding workload.