Online Training > SolidWorks API, SolidWorks VBA

Course Overview:



This basic to intermediate course covers the use of the SolidWorks programming environment and interface. The first half of the course deals with VBA ("built-in" Visual Basic for Applications) as well as full VB (Visual Basic environment). The course provides introductory Visual Basic training to help familiarize you with the programming language. The second half of the course introduces you to the SolidWorks API (Application Programming Interface). The course will teach you how to use the API to automate SolidWorks for your working environment. Design custom applications to increase workflow and reduce mundane SolidWorks tasks and enhance SolidWorks tools to better suit your needs.


SolidWorks API Training Includes:



Introduction to VBA: API Course Introduction, Introduction to VBA, Menus and Toolbars, The Project Explorer Window, The User Form and Toolbox, The Properties Window, The Code Window, Help.

Controls: Introduction to Controls, Starting a New Project, Adding Controls, Control Properties, Event, Procedures, Tab Order, Common Controls (Label, Buttons and Text Boxes), Form Properties, Setting up the Form.

Code Basics: Introduction to Code Basics, Data Types, Literals, Variables, Putting Data in Variables, Expressions and Math Operators, Using Variables.

Making Decisions: Introduction to Making Decisions, Comparison Operators, The If Statement, Logical Operators, The Select Case Statement, Making Decisions.

Repeating Code: Introduction to Repeating Code, The Do While Loop, The Do Until Loop, The Other Do Loops, The For Loop, Terminating Loops Early, Repeating Code.

Lists and Options: Introduction to Lists and Options, List Boxes, Combo Boxes, Option Buttons, Arrays, Optional Listings.


Built-In Functions: Introduction to Built-in Functions, Numeric Functions, String Functions, Date and Time Functions, Data Testing Functions, Data Conversion Functions, Format Function, Using Built-In Functions.

Modular Programming: Introduction to Modular Programming, Structured Programming, Calling Procedures, External Modules, Coding Subroutines, Coding Functions, Sending Arguments, Receiving Arguments, Modularizing Code.

Debugging: Introduction to Debugging, Types of Errors, The Debugger, The Call Stack, The Watch Window, The Immediate Window, Tips on Trouble Shooting, Debugging a Program.

The Macro Recorder: Introduction to the Macro Recorder, The Macro Toolbar, Reading the Macro Code, Editing the Macro Code, Running the Macro (Part 1), Running the Macro (Part 2), Recording a Macro, Enhancing the Code.

The SolidWorks Object Model: Introduction to the SolidWorks Object Model, SolidWorks Objects, SolidWorks Type Library, The SldWorks Object, The ModelDoc2 Object, The PartDoc Object, The AssemblyDoc Object, The DrawingDoc Object, Creating New Documents, Accessing Existing Documents.

Options and Properties: Introduction to Options and Properties, Setting Checkboxes, Setting Textboxes, Setting List Boxes, Setting Radio Buttons, Setting Slider Bars, Setting Options and Properties.

Part Automation: Introduction to Part Automation, Setting Material, Creating the Sketch Rectangle, Creating Extruded, Features, Adding Dimensions, Automating Parts.

Assembly Automation: Introduction to Assembly Automation, Adding Components, Selecting Components, Adding Mates, Working with Transforms, Automating an Assembly.

Drawing Automation: Introduction to Drawing Automation, Creating Sheets, Creating Views, Inserting Annotations, Automating a Drawing.

User Selection: User Selection, Introduction to User Selection, The Selection Manager, Accessing Definitions, Modifying Definitions, Changing Selected Features.

Traversal: Introduction to Traversal, Traversing Faces, Setting Face Properties, Feature Manager Traversal, Setting Feature Suppression, Traversing Geometry, Traversing the Feature Manager.

Custom Properties: Introduction to Custom Properties and the API, Setting and Getting Custom Properties, Getting Custom Property Names, Getting Configuration Names, Adding Summary Information, Creating a Custom Property Program.