跳到主要内容

Editing VBA and VSTA Macros in SOLIDWORKS

The source code for VBA macros (.swb and .swp) as well as VSTA macros (.csproj and .vbproj) can be edited directly in SOLIDWORKS.

  • Navigate to the Tools -> Macro -> Edit menu command.

Edit Macro Menu Command

  • Browse for the specified macro (or change the file filter if needed)
  • Or select a macro from the recent files (if available)

This command will open a new VBA editor or Visual Studio (VSTA macro editor).

Modify the code as needed and save the changes.