U225X PUBLIC-SAFE CONVERSATION NOTE RECORD: CHAT-0237 TOPIC: Macro for DXF Export IMPORTED: 2026.04.18 This note was generated from a matching conversation in the supplied ChatGPT export. EXTRACTED REQUEST: can we write a macro that steps into the flat pattern and exports it as a clean dxf without prompting me for anything? By clean I mean I want everything on the 0 layer, no bend lines, only interior and exterior features, no splines, only polylines, arcs, circles, normal lines ect. I want it saved as the current filename in the same directory. RECOVERED CONVERSATION EXCERPTS USER MESSAGES: 1. can we write a macro that steps into the flat pattern and exports it as a clean dxf without prompting me for anything? By clean I mean I want everything on the 0 layer, no bend lines, only interior and exterior features, no splines, only polylines, arcs, circles, normal lines ect. I want it saved as the current filename in the same directory. 2. i do want to avoid any hole feature that contain counter bores or threads as will those will go in, in the machine shop 3. this is the coed that i have what is wrong with it 4. ITS STILL JUST GIVING ME TH EFACE OR A SINGLE VIEW NOT THE ACTUAL FLAT PATTERN ASSISTANT RESPONSES: 1. I’m checking the SolidWorks API details for flat-pattern DXF export so I can give you a version that runs without dialogs and strips out the extra junk. 2. I’ve got the extra requirement: skip holes that would create counterbore or threaded geometry in the DXF, so only plain cut geometry stays. I’m verifying which export flags and edge-filtering route will be most reliable in SolidWorks 2025. 3. Yep — I think I see the real issue now. Your part is in `FINAL PRINT`, not the derived flat-pattern configuration. In sheet metal parts, SOLIDWORKS commonly stores the actual developed blank in a separate `*-FLAT-PATTERN` config. `ExportToDWG2` does support sheet-metal export, and `swExportToDWG_ExportSheetMetal` is the correct action, but if you do not switch to the flat-pattern configuration first, you can end up exporting something that behaves like a folded face/profile instead of the true blank. [embedded media omitted] Use this new complete macro. It does four important things differently: - finds and activates the flat-pattern configuration - suppresses bend lines and bounding box sketches in that confi… EXTRACTED KNOWLEDGE / HOW-TO - works on the active sheet metal part - saves the DXF as same folder + same filename + `.dxf` - exports flat pattern geometry only - exports splines as polylines - turns off DXF layer mapping - suppresses thread features, advanced holes, and non-simple Hole Wizard holes before export - rebuilds, exports, then restores the suppressed features - Set swApp = Application.SldWorks CONVERSATION SHAPE: 8 user turns / 12 assistant turns ATTACHMENTS DETECTED: 66 Raw transcripts, private details, exact locations, account information, employer/customer-confidential material, and restricted software references are not published in this note. PROPERTY OF U225X / PUBLIC-SAFE IMPORT