SolidWorks 2011 Parts Bible - Matt Lombard [38]
Accessing macros
Macros are short snippets of programming code that have a particular function. Most macros are small and intended for simple tasks that are repeated many times, such as changing selected dimensions to four decimal places or zooming the screen so that it is sized 1:1 (actual size). Macros may be recorded, written from scratch, or a combination where you record a particular action for use as a starting point and then embellish it manually from there. Recorded macros may not always record the parts of the action that you want to make into a macro, but you can edit them manually to include anything that you can program with the SolidWorks API (application programming interface), which is included with the base SolidWorks package at no extra cost.
To access macros by using hotkeys, follow these steps:
1. Make a folder in your SolidWorks installation directory called “macros.”
2. Copy macros into this folder.
3. Start (or restart) SolidWorks.
4. Choose Tools⇒Customize⇒Keyboard.
5. Scroll to the bottom of the list under the Macros category and then assign hotkeys as you would for standard SolidWorks commands.
Whether you are skilled at writing or recording macros, or you are just using macros collected from other people, they can be huge time-savers and offer functionality that you would not otherwise be able to access.
Saving custom interface settings
Once you have set up your menus and toolbars, worked out all of custom colors, figured out your hotkey usage, and connected your macros, you don't want to lose these settings when you reinstall the software or move to a different computer. Another user may want to share your settings, or you may want to transfer them to your home computer (for modeling the new deck or the doghouse, of course). Fortunately, these settings are very portable.
You can use the Copy Settings Wizard to save these settings out to a file. Access the wizard by choosing Start⇒Programs⇒SolidWorks 2010⇒SolidWorks Tools⇒Copy Settings Wizard. This creates a file with an *.sldreg file extension. You can restore settings by double-clicking this file on a computer that has SolidWorks installed on it.
Note
You may need to have administrator access to your computer to apply a SolidWorks registry file.
The SolidWorks settings are actually Windows registry settings. The file that is saved by the wizard is just a registry file that has a different extension to prevent it from being applied too easily. Saved-out Windows registry files have a *.reg file extension, and you can integrate them into the registry by simply double-clicking them. If you are not familiar with the Windows registry, you should not make direct changes, because even small changes can cause serious problems with your operating system, installed software, or even hardware. The settings that are saved out by the Copy Settings Wizard are safe to transfer between computers. In order for the Copy Settings Wizard to work, you need to have Administrator-level access to your computer. The Copy Settings Wizard is shown in Figure 2.40.
FIGURE 2.40
The Copy Settings Wizard
Working with multiple document windows
You may sometimes have the luxury of working on a single part at a time, but more often you will find yourself with several documents open at once. This is a common situation for most users. Fortunately, SolidWorks has several methods for dealing with “information overload” to help you sort through it all.
Managing windows
Like most Windows applications, SolidWorks can arrange the open document windows in one of several ways that are available through the Window menu (see Figure 2.41):
• Cascade. Most useful for accessing documents that are to be edited one by one.
• Tile Horizontally. Most useful for comparing wide and short parts side by side.
• Tile Vertically. Most useful for tall, narrow parts, or documents where you want to compare items in the FeatureManager.