Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Master the SOLIDWORKS API: Automate Your Workflow with VBA

Master the SOLIDWORKS API: Automate Your Workflow with VBA

Automate SOLIDWORKS parts, assemblies and drawings with VBA and the SOLIDWORKS API, from your first macro up
Created byAmen Jlili
Last updated 9/2026
English

What you'll learn

  • Record, write and edit SOLIDWORKS macros in the Visual Basic Editor
  • Learn core VBA: variables, control structures, functions, classes and error handling
  • Build user forms and navigate the SOLIDWORKS API documentation
  • Manage documents, custom properties, configurations and selections with the API
  • Automate part modeling: bodies, entities, reference geometry, sketches and features
  • Automate assemblies: traverse components, insert parts and create mates
  • Automate drawings: views, annotations and bills of materials

Course content

7 sections • 40 lectures • 9h 12m total length
  • Introduction to SOLIDWORKS API and VBA5:11
  • VBA Macro Recorder10:56
  • Writing Your First VBA Macro6:39
  • Navigating The Visual Basic Editor (VBE)9:11

Requirements

  • SOLIDWORKS installed and basic SOLIDWORKS modeling skills
  • No prior programming experience needed

Description

Tired of repeating the same tasks in SOLIDWORKS? This course takes you from recording your first macro to writing your own automation with VBA and the SOLIDWORKS API, covering parts, assemblies, and drawings along the way. No prior VBA experience is needed: the VBA Basics section covers the language from the ground up before you move on to the API.

General Introduction: an introduction to the SOLIDWORKS API and VBA, the macro recorder, writing your first macro, and navigating the Visual Basic Editor.

VBA Basics: variables and data types, control structures, subroutines and functions, modules and classes, data structures, naming conventions and comments, debugging, advanced error handling, Option Explicit, events, user forms, and how to navigate the SOLIDWORKS API documentation.

SOLIDWORKS API: the SldWorks interface, document management, system options and document settings, custom properties, traversing the feature tree, selection with ISelectionMgr and SelectById2, and configuration management.

Part Modeling: creating documents from templates, working with bodies, the IEntity interface, traversing edges, vertices and faces, reference geometry, sketching and extruding, and suppressing features.

Assembly Modeling: traversing the component tree, referenced configurations, inserting components, advanced selection techniques for mates, and mating components with IMate.

Drawing Modeling: creating drawings with predefined views, adding annotations, and creating a bill of materials.

Who this course is for: SOLIDWORKS users, CAD administrators, and engineers who want to automate repetitive work and build their own tools with VBA.

Who this course is for:

  • SOLIDWORKS users who want to automate repetitive work
  • CAD administrators and engineers building in-house tools
  • Beginners who want to learn VBA through practical SOLIDWORKS projects