solidworks-macro

Generate SolidWorks 2021 VBA macros with PDM Professional integration.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Ascenseurs-Menetrey-SA/amsa-claude-skills --skill solidworks-macro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solidworks-macro
Source: https://github.com/Ascenseurs-Menetrey-SA/amsa-claude-skills/tree/main/solidworks-macro
Command: npx skills add https://github.com/Ascenseurs-Menetrey-SA/amsa-claude-skills --skill solidworks-macro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill removes the friction of writing repetitive, error-prone SolidWorks 2021 VBA macros by generating complete, convention-compliant code including SolidWorks and PDM integration.

Core Features & Use Cases

  • SolidWorks export automation: Generate VBA macros to export PDFs, DXF, DWG, STEP, or IGES from the active document or in multi-sheet drawing exports.
  • Custom property (CRUD) automation: Generate macros to read, write, delete, and copy custom properties across configurations.
  • PDM Professional operations (check-out/in, variables, workflows, batch): Generate macros that securely connect to a PDM vault, manage locks, update PDM variables, and run batch operations with better performance.
  • Interactive UI generation (UserForm): Generate macros with a responsive UserForm (progress label, cancel handling, folder browsing) for guided execution.

Quick Start

Ask: generate a SolidWorks 2021 VBA macro to export all drawing sheets to PDF into a specified output folder, then perform PDM check-out before export and check-in after export.

Frequently Asked Questions about solidworks-macro

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a SolidWorks VBA macro to export drawings to PDF?

You can generate a SolidWorks VBA macro to export drawing sheets to PDF by requesting automation code that handles multi-sheet exports, validates the ActiveDoc, and outputs to a specified folder.

How do I automate custom property updates across configurations in SolidWorks?

Automating custom property updates in SolidWorks involves generating VBA macros that read, write, delete, or copy metadata across configurations while maintaining standardized code structure and error handling.

Can I use VBA to check files in and out of SolidWorks PDM Professional?

Yes, you can generate VBA macros that securely connect to a PDM vault, perform login and lock checks, manage file check-out and check-in, update PDM variables, and execute batch operations.

What is the best way to add a UserForm UI for batch processing in SolidWorks macros?

The best way to add a UserForm UI for SolidWorks batch processing is to generate VBA code that includes a responsive interface with progress labels, cancel handling, and folder browsing for guided execution.

Does generated SolidWorks VBA code include error handling and COM object cleanup?

Yes, generated SolidWorks VBA code includes robust error handling with standardized ErrHandler and Cleanup sections, ensuring proper COM object releases and restoring performance toggles like CommandInProgress.

Why does my SolidWorks macro fail when the active document is not validated?

SolidWorks macros fail without active document validation because the code must check ActiveDoc and GetPathName before executing export or property operations to prevent runtime errors on unloaded files.