US$0.00
0

SOLIDWORKS Macro to Export Assembly Components as Parasolid

Description

The macro will traverse your open SOLIDWORKS assembly file (.SLDASM) methodically and recursively, detect each child component (part), and then proceed to automatically save each part in the stable Parasolid (X_T) format. The macro traverses recursively through the assembly structure so that each part is saved based on the part name.

System Requirements

  • SOLIDWORKS Version: SOLIDWORKS 2014 or newer
  • Operating System: Windows 7 or later.

Pre-requisites

To execute the macro, the following conditions must be satisfied:

  • The active document within SOLIDWORKS needs to be an assembly document (.SLDASM).
  • There should be a valid output folder path ready to receive the Parasolid (X_T) files.

Results

The results of your automated batch export process are:

  • A separate Parasolid (X_T) file will be created for each unique part that is processed in the assembly’s hierarchy.
  • The files will be exported to the user-specified folder path and retain the original part file name used when exporting.
  • The macro also intelligently skips parts that are suppressed or already opened in a second SOLIDWORKS window.

Steps to Set Up the Macro

  • Register Macro File: Open either a new or existing SolidWorks session and navigate to the Tools > Macro > New…
  • Name Macro File: It is advisable to give the macro an appropriate title, such as “BatchAssemblyToXT.swp”, which will stand for easier identification in the future. Once you have saved, another dialog will then display with the VBA editor open.
  • Paste the code: Download and copy the VBA code provided for you below, and paste it into your editor. This process setup is typically used when a creating SOLIDWORKS macro to export assembly components as parasolid efficiently.
  • Execute the Macro: Wait for the prompt to save your work and close the editor. With the assembly open, you can now run your macro through Tools > Macro > Run, or by using a previously assigned shortcut.

VBA Macro Code

Macro

You can download the macro fromĀ here.

Reach out, and we’d be happy to assist with integrating this or any other batch process into a more complete system based on your needs.

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
    ×