How to use SOLIDWORKS Macros to Automate Drawing Access and Flat Pattern Export?

SOLIDWORKS Macros are small programs (usually written in VBA, VB.NET, or C#) that automate repetitive tasks inside SOLIDWORKS. They’re a powerful way to save time, reduce errors, and enforce consistency in design processes.

Here we can see an example of how to utilize the SOLIDWORKS macros.

Download the macro files from the given attachment to work as per the below guidelines.

Open Associated Drawings

Using the macro, we can open all the associated drawings of a part or assembly. Let’s see the step-by-step process.

  • Open a part\assembly file in SOLIDWOKRS.
  • Go to customize > Commands > Macro > New Macro Button
SOLIDWORKS Macros customize


  • Drag and Drop into the command manager and it will ask to browse the source file.
  • Browse & add the macro file and click Ok.
  • Now, the macro button “Open Associated Drawings” added in the command manager.
SOLIDWORKS Macros customize

  • Open the part/assembly file and click the “Open Associated Drawings” and you just witness the drawings which are all associated with the file will open in SOLIDWORKS
SOLIDWORKS Macros open associate drawing

DWG-DXF Export of Flat Pattern

Using this macro, we can export the flat pattern view of sheet metal part into dxf/dwg format which helps in nesting process

  • Open a sheet metal part in SOLIDWORKS.
  • Repeat the same process to add a new macro button in command manager for “DWG-DXF Export of Flat Pattern”.
  • Now, the macro button “DWG-DXF Export of Flat Pattern” added in the command manager.
  • Now, open the sheet metal part and click the macro and Dwg folder created in the same location as the part file saved.
  • Open the Dwg folder to find the dwg file for flat pattern view of a sheet metal part.
SOLIDWORKS Macros customize button




Comments

Popular posts from this blog

SOLIDWOKRS TECH TIP - SOLIDWORKS PROPERTY TAB BUILDER

Confused With Wire/Cable Harnessing? - Harnessing Technology By SolidWorks Electrical

SolidWorks Electrical Solutions for Control Panel Design