Video: Write A Powerful Macro from Scratch, Episode 2

Blog 11.7.2013 4 Comments

Owing to the popularity of our post titled Write A Powerful Macro From Scratch I decided to create another free video along the same lines. Unlike my beginner-level videos, this series assumes you already have a basic knowledge of the API (especially the API Help). That way we can focus on nothing but coding.

In this video I’ll show you how to create a left-hand version of a part using the Mirror and Delete Body feature. (The beauty of this method is that both right-hand and left-hand versions reside in the same document.) Then I show you how perform this operation in bulk on all parts in a specified folder. But that’s not all. You’ll also see how assumptions play a very important role in your code. I’ll also show you the importance of comments for outlining, testing, and prefacing code.

Files

Download file set and completed code (files will open in SolidWorks 2011)
Download the video (in case Youtube is blocked on your network)

What do you think? Let me know if you want to see more videos of this kind in the future.

Keith

Want to keep up with future CADSharp.com content, webinars, and special offers? Sign up for our newsletter.

4 Responses to “Video: Write A Powerful Macro from Scratch, Episode 2”

  1. April

    Hi Keith,

    I would like to know if is it too early to learn Solidworks API for me. I’m using solidworks for around 3 months now but I’m a bit frustrated because i think I’m limited on certain options to automate my work. At the moment Im just using Design Table for semi-automation of our product. I’m having some feedback that it’s too early to use API and of course I’m not a programmer but i know i can learn it. Some were saying, it’s better to use KBmax because programming is less. Please advise because I’m willing to be a premium member to start learning.

    Thanks a lot,
    April

    • April, I agree with Jeff. You can never start learning the API too early. The video tutorials at cadsharp.com do not require an advanced knowledge of SolidWorks so it is unlikely that you’ll get overwhelmed. Moreover, VBA & API programming is a skill that you will find useful well beyond SolidWorks so don’t think of learning the SolidWorks API as something that is limited to your experience with SolidWorks.

  2. Hey April, it is certainly important to know the software you are automating….the more you know the easier it will be. However I feel it is never too early start learning the API. I know people who use SolidWorks very little, but are very good with the API.

    • April

      Hi Jeff, thanks for the tip and encouragement. Basically, there’s a huge task for me.. I’m assigned to be one of th “Solidwork ADMIN” and has to develop library, automation, standards for our company..

      I don’t know where to start.. Of course, know deeper the software is the first and i know skills will be a long process.. I hope I can develop a good one someday.

Questions and Comments

You must be logged in to post a comment.