U225X PUBLIC-SAFE CONVERSATION NOTE RECORD: CHAT-0238 TOPIC: Macro for PART_NUMBER IMPORTED: 2026.04.14 This note was generated from a matching conversation in the supplied ChatGPT export. EXTRACTED REQUEST: Oh if you can fill the PART_NUMBER field with a number lets use MW-C0728-ARAI as a prefix and -0001 through whatever for the parts make sense RECOVERED CONVERSATION EXCERPTS USER MESSAGES: 1. I NEED A QUICK MACRO THAT ADDS "PART_NUMBER" TO EVERY CUTLIST ITEM IN A WELDMENT PART SOLID WORKS 2025 2. Oh if you can fill the PART_NUMBER field with a number lets use MW-C0728-ARAI as a prefix and -0001 through whatever for the parts make sense ASSISTANT RESPONSES: 1. Got it — here’s a clean, no-BS macro that will: ✅ Loop through every cut list item in a weldment ✅ Add a custom property called `PART_NUMBER` ✅ Populate it (you can control how — I defaulted to item name or sequential numbering). 🔧 SOLIDWORKS 2025 VBA MACRO ➤ Adds `PART_NUMBER` to every cut list item :::writing{variant="standard" id="48291"} Option Explicit Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim swPart As SldWorks.PartDoc Dim swFeat As SldWorks.Feature Sub main() Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc If swModel Is Nothing Then MsgBox "Open a weldment part first." Exit Sub End If If swModel.GetType <> swDocPART Then MsgBox "This macro only works on PART fi… 2. Perfect — that’s exactly how you should be doing it 👍 Here’s your updated macro that will: ✅ Add `PART_NUMBER` to every cut list item ✅ Format it as: `MW-C0728-ARAI-0001`, `MW-C0728-ARAI-0002`, … ✅ Automatically increment for each item. 🔧 FINAL MACRO (READY TO PASTE) :::writing{variant="standard" id="73952"} Option Explicit Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim swFeat As SldWorks.Feature Sub main() Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc If swModel Is Nothing Then MsgBox "Open a weldment part first." Exit Sub End If If swModel.GetType <> swDocPART Then MsgBox "This macro only works on PART files." Exit Sub End If Dim prefix As String prefix = "MW-C0728-AR… EXTRACTED KNOWLEDGE / HOW-TO - -- - Set swApp = Application.SldWorks - Set swModel = swApp.ActiveDoc - Set swPart = swModel - Set swFeat = swModel.FirstFeature - Set swBodyFolder = swFeat.GetSpecificFeature2 - Set propMgr = swFeat.CustomPropertyManager - Set swFeat = swFeat.GetNextFeature CONVERSATION SHAPE: 2 user turns / 2 assistant turns ATTACHMENTS DETECTED: 2 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