Site icon BLUE BYTE SYSTEMS INC.

The VBA Macro to Automate Sketch Editing in SOLIDWORKS

Description

This macro for SOLIDWORKS automates a repetitive and frequent task for engineers: changing and exiting sketches. Following the provided code, it is capable of automatically determining and adjusting the view to normal for an active sketch or exiting the sketch if the view is already normal. Also, when to open a sketch, when to normalize a view, and when to exit from the sketch is needed. The macro can also deal with suppressed subcomponents automatically, as well as navigate complex feature trees. This makes a VBA macro to automate sketch editing in SOLIDWORKS a potent addition to your design process and productivity.

System Requirements

Pre-Conditions

Results

Process to Implement the Macro

  1. Execute the Macro: Execute the macro in an open SOLIDWORKS document. The associated document must be a valid document type (part or assembly), and the appropriate items must be selected.
  2. Behavior Based on Selection:

○        If the user has selected a feature or geometry, the macro will open the driving sketch and view the model in a different view.

○        If no entities are selected and the user is in an active sketch, the macro will set the view to normal.

○        If the user is already viewing in a normal view, the macro will exit the sketch and end.

VBA Macro Code

Macro

You can download the macro from here.

Customization of The Macro

For engineering teams who have special workflow requirements, please reach out, and we will be sure to provide you with our modified version to meet your immediate needs. Regardless of your level of customization needs to maximize your design process, we can help!

Custom development of SOLIDWORKS macros and add-ins is our specialty at Blue Byte Systems Inc. However, we also specialize in seamless integration with existing systems, specific file types or multi-body part tasks are always in mind.

Please contact us to discuss how we can help you reach a more efficient and productive workflow with our custom solutions.

Exit mobile version