You need to be logged in to view this content. Please login or become a member.

<<  Prev   |   Index   |   Next  >>


In this lesson we show the basics of working with the SolidWorks API to create a simple macro. The very important topic of how to use the API Help properly is introduced.


For a great list of interfaces listed by their function / use in SolidWorks, search in the local API Help index tab for “Functional categories”.

Lesson Files

Lesson 2.2 code


Lesson 2.2 homework part A solution
Lesson 2.2 homework part B solution


  1. gwenolebernard1

    Thanks a lor for this great tutorial

  2. CryoDesigner

    At 10:30 rather than copy and paste you can use Ctrl + Space to bring up the IntelliSense. All you have to remeber is swmes . . . and that should get you in the general neighborhood. Good video.

  3. andy21283

    I have minimal experience programming so this may be a dumb question, but in the variable declariation “Dim swApp As SldWorks.SldWorks”, I don’t understand the “SldWorks.SldWorks” object; can you please explain what this represents?

    • The SldWorks in front is the namespace contained in the SolidWorks API type library. Hence, when you type that, you indicate that you are looking for a particular object within that namespace as opposed to another namespace, since technically two namespaces could have two classes with identical names.

Questions and Comments

You must be logged in to post a comment.