O'Reilly logo

SolidWorks® 2007 Bible by Matt Lombard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 32. Creating and Using Macros

IN THIS CHAPTER

  • Recording macros

  • Creating a macro with a user form

  • Finding macro help

Macros can be an important source of productivity enhancements that are not offered directly by SolidWorks software. Being able to create your own macros can make you more valuable at your place of work. Macros can do anything from centering a rectangle on the Origin, to setting all face colors back to the part color, to changing the decimal places of a selected dimension, to creating a spline from an equation. You do not have to be a programmer to follow the information in this chapter. However, you should have a general understanding of Visual Basic.

Visual Basic is a common programming language. Visual Basic for Applications, or VBA, is included in SolidWorks in the same way that it is included in Word and Excel. If you have programming skills with these other common applications, then those skills are largely transferable to working with SolidWorks macros.

Application Programming Interface, or API, refers to the available SolidWorks functions that can be called programmatically (numbered in the hundreds) from VB, VBA, VB.NET, C++, C# (c sharp), or macro files that have the filename extension of *.swp or *.swb.

Note

The *.swb filename extension type is a legacy macro. You can edit and save these files into the newer SWP format, or you can run them as they are. Also keep in mind that *.swp is the filename extension that is used by the Windows Swap file.

This chapter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required