US$0.00
0

SolidWorks Macro to Efficiently Manage Assembly by Hiding All Sketches

Description

This macro hides all visible sketches in the active assembly. This is useful for cleaning up the view in complex assemblies where multiple sketches may clutter the workspace.

SolidWorks Macro to Efficiently Manage Assembly by Hiding All Sketches and An image divided into two side-by-side sections labeled "Before" and "After," showing a 3D model of a gas cylinder in a SOLIDWORKS interface. The "Before" section displays the cylinder with a handle and valve assembly at the top, a blue plane labeled "Plane2" and "Plane4" intersecting it, and a circular base outline. The "After" section shows the same cylinder with the handle and valve assembly adjusted, the blue planes repositioned, and the circular base outline removed, indicating a refined design. Both sections include a 3D view with axes indicators.

System Requirements

  • SolidWorks Version: SolidWorks 2014 or newer
  • Operating System: Windows 7 or later

Prerequisites

  • An assembly document must be the active document and open in SolidWorks.
  • At least one of the components in the assembly must have a sketch feature currently displayed to be relevant to the macro’s action.

Results

  • The macro will iterate through the feature tree of the assembly and all nested components, and all visible sketches will become hidden globally across the active assembly.

Steps to Set Up the Macro

To quickly get the SolidWorks macro to efficiently manage assembly by hiding all sketches up and running, follow these brief instructions:

  1. Open the Target Assembly: Open the desired SolidWorks assembly file to be the active document that will hide sketches.
  2. Load the Macro: Open the VBA editor by selecting Alt+F11, then load the macro file (SWP) into the SolidWorks Environment.
  3. Execute The Macro: Run the macro by navigating to Tools → Macro → Run, in the SolidWorks interface.

Pro-Tip: It is highly recommended to assign a keyboard shortcut or a toolbar button to this macro to achieve maximum speed and efficiency.

VBA Macro Code

Macro

You can download the macro from here.

Customize with Expert Support

Contact us today and get the most from your SolidWorks automation.

Author

Amen Jlili

Amen Jlili is the founder and technical director of Blue Byte Systems Inc., a software company in Vancouver, Canada, specializing in automating SOLIDWORKS and PDM. With over a decade of experience, he has authored several courses and open-source frameworks related to the SOLIDWORKS API. His leadership ensures that Blue Byte Systems prioritizes customer satisfaction and delivers high-quality software and CAD design solutions.
0
    0
    Your Cart
    Your cart is emptyReturn to Shop
    ×