Hello Aron,
So glad you found this code useful! I will do my best to help you get those values into your dxf file names.
I think I am following what you are doing here and I believe that you are really close to getting what you want. I don't see any effort to call the Make_DXF sub here, so are you running this code and then running the DXF code separately? I am pretty sure you could do this all in one shot but it will work this way too.
All you should need to do now is grab that custom iProperty value as the dxf code is building the file name. This can be tricky because you have to set up variables first. Here is what I recommend you try:
(note first - there are a number of iterations of the DXF code in this post, we might need to back up to the exact one you are using, but they are close enough that these steps are probably valid - also, the code I use today is improved/different from what is posted here, again we may need to get on the same page at some point here)
1. Dim all these variables at the top of the Make_DXF sub
Dim oPropSets As PropertySets = doc.PropertySets
Dim oSumInfo As PropertySet = oPropSets.Item("Inventor Summary Information")
Dim oDocSumInfo As PropertySet = oPropSets.Item("Inventor Document Summary Information")
Dim oDesTrackProps As PropertySet = oPropSets.Item("Design Tracking Properties")
Dim oUserDefProps As PropertySet = oPropSets.Item("Inventor User Defined Properties")
(See bottom of this reply for what iProperties are found in what group of iProperties)
2. Replace this line within Make_DXF sub:
Dim New_Name As String = Part_Name
with this line:
Dim New_Name As String = oUserDefProps("StockSize").Value
In case you are wondering, yes, you only need the first and last Dim line in step 1, I just always Dim them all when I need to access iProperties and include the list (at the end of this reply) for future reference.
I have not tested any of this, hopefully it works without a hitch. Good luck and let me know if I can help further. @Aron.Molnar858QE
-Kevin
List of iProperties Groups:
'''1) Inventor Summary Information
''' 1) Title
''' 2) Subject
''' 3) Author
''' 4) Keywords
''' 5) Comments
''' 6) Last Saved By
''' 7) Revision Number
''' 8) Thumbnail
'''2) Inventor Document Summary Information
''' 1) Category
''' 2) Manager
''' 3) Company
'''3) Design Tracking Properties
''' 1) Creation Time
''' 2) Part Number
''' 3) Project
''' 4) Cost Center
''' 5) Checked By
''' 6) Date Checked
''' 7) Engr Approved By
''' 8) Engr Date Approved
''' 9) User Status
''' 10) Material
''' 11) Part Property Revision Id
''' 12) Catalog Web Link
''' 13) Part Icon
''' 14) Description
''' 15) Vendor
''' 16) Document SubType
''' 17) Document SubType Name
''' 18) Proxy Refresh Date
''' 19) Mfg Approved By
''' 20) Mfg Date Approved
''' 21) Cost
''' 22) Standard
''' 23) Design Status
''' 24) Designer
''' 25) Engineer
''' 26) Authority
''' 27) Parameterized Template
''' 28) Template Row
''' 29) External Property Revision Id
''' 30) Standard Revision
''' 31) Manufacturer
''' 32) Standards Organization
''' 33) Language
''' 34) Defer Updates
''' 35) Size Designation
''' 36) Categories
''' 37) Stock Number
''' 38) Weld Material
''' 39) Mass
''' 40) SurfaceArea
''' 41) Volume
''' 42) Density
''' 43) Valid MassProps
''' 44) Flat Pattern Width
''' 45) Flat Pattern Length
''' 46) Flat Pattern Area
''' 47) Sheet Metal Rule
''' 48) Last Updated With
''' 49) Sheet Metal Width
''' 50) Sheet Metal Length
''' 51) Sheet Metal Area
''' 52) Material Identifier
''' 53) Appearance
''' 54) Flat Pattern Defer Update
'''4) Inventor User Defined Properties