Continue to Site

Welcome to 3DCADForums

Join our CAD community forums where over 25,000 users interact to solve day to day problems and share ideas. We encourage you to visit, invite you to participate and look forward to your input and opinions. Acrobat 3D, AutoCAD, Catia, Inventor, IronCAD, Creo, Pro/ENGINEER, Solid Edge, SolidWorks, and others.

I made a Flat-Pattern export tool for batch exporting to Dxf. Supports Multi-Body. Batch hundreds of configs/files.

For those who do a lot of sheet-metal, you probably know exporting large quantities of flat patterns can take time. Before trying a paid service, I decided I would take a stab at writing a macro to handle batch exporting many files with many configurations. Ultimately, it turned into a saga. But I've been wanting to share it for a while now since I learned a lot on the SW forums in the process of making this, and I'm happy to be returning it in a new form to those who contributed with their sheet-metal VBA posts. Below you'll find the About doc that is part of the macro.

https://drive.google.com/file/d/1j7LZkM15MT_wWuIimJDcxrd6uifVfXAs/view?usp=sharing

Uses:
Batch export 2D flat-pattern DXF/DWG files of by specified configurations for single, or multiple, Solidworks sheet-metal part files. This export tool supports exporting all bodies in a multi-body sheet-metal sldprt.

Automatically correct flattened states of configurations whose flat-pattern is not unsuppressing all bends.

Single / Batch / Assembly:

SINGLE exports the active document; User chooses configurations to export

BATCH searches for all .SLDPRT files in the folder where the active document resides. In the selection pane, check the desired parts for export. All configurations in each part file are exported.

ASSEMBLY exports will export all unsuppressed sheet-metal parts in the active assembly configuration; will export only the active part configuration, and will not export the same configuration when duplicate instances are found in the assembly.

All export files are output to individual folders that then separate flat-patterns into additional folders separated by Material and Thickness.

Setup:

A single .SLDPRT/.SLDASM file must be open before running the export.

IT IS HIGHLY RECOMMENDED TO HAVE ONLY ONE FILE OPEN IN SOLIDWORKS WHEN USING THIS TOOL.

No more than one file may be open when starting the export!

Export file(s) must contain a Sheet-Metal body, or the export tool will skip over that file. This is particularly useful for large assemblies that contain lots of non-sheet metal bodies, such as hardware, weldments, surfaces...

For Mapping file use, the 'settings' button will allow for direct access to, and manipulation of, the DXF/DWG export system options. Changing these settings will only be maintained for the duration of the export; upon completion of the export, the DXF/DWG export system options will be returned to their original state.

CAUTION! Do not add or removed files/folders from the folder where the export part(s) reside. Doing so may cause the program to crash.

Troubleshooting:

If Bend Correction is enabled and part does not flatten, check sldprt file for errors or warnings. Correct all before re-running the tool.

If Bend Correction is enabled and bend lines do not show, check sldprt file for errors or warnings. Correct all before re-running the tool.

The tool has a lot options, with a lot of readme built-in, so hopefully using it is self-explanatory. I finished this sometime early 2021 and hadn't looked at it for a while up in until recently. I made a few changes per some feedback and then fixed and broke a few things, and now everything seem to run stable. If you find errors or have bugs, see the about.

Thanks!

Sasha
 

Attachments

  • Sushi-Solidworks-Sheet-Metal-DxfExportTool-1.0.15.zip
    442.7 KB · Views: 23

Articles From 3DCAD World

Sponsor

Back
Top