<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Content Center Add Columns in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/content-center-add-columns/m-p/13389655#M1214</link>
    <description>&lt;P&gt;I was able to figure it out. Using the following code will add a custom property for the column.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;' Set the custom property using a different method
                        Dim propSetId As String
                        Dim propIdentifier As Variant
                        propSetId = "Custom"
                        propIdentifier = "Material - General"
                        Call oNewCol.SetPropertyMap(propSetId, propIdentifier)
                    End If&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 25 Mar 2025 14:36:36 GMT</pubDate>
    <dc:creator>KWarrenCA</dc:creator>
    <dc:date>2025-03-25T14:36:36Z</dc:date>
    <item>
      <title>Content Center Add Columns</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/content-center-add-columns/m-p/13389484#M1213</link>
      <description>&lt;P&gt;I'm creating a VBA code that will add a new column to every family table in a folder in the content center editor. I have the code working correctly but the only issue I have is I would like to map the column to a custom iproperty but running into how to do that. So far I haven't found here I can pull that information from.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KWarrenCA_0-1742908749522.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1481614iA56504620AC0AD00/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KWarrenCA_0-1742908749522.png" alt="KWarrenCA_0-1742908749522.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub ModifyFamilyTable()

    Dim oContentCenter As ContentCenter
    Set oContentCenter = ThisApplication.ContentCenter
    
    Dim hexHeadNode As ContentTreeViewNode
    Set hexHeadNode = ThisApplication.ContentCenter.TreeViewTopNode.ChildNodes.Item("Tube &amp;amp; Pipe").ChildNodes.Item("Fittings").ChildNodes.Item("Adapters")
    
    Dim family As ContentFamily
    Dim checkFamily As ContentFamily
    For Each checkFamily In hexHeadNode.Families
        Set family = checkFamily
        
        Dim oContentTableColumns As ContentTableColumns
        Set oContentTableColumns = family.TableColumns
        
        ' Check if the column already exists
        Dim columnExists As Boolean
        columnExists = False
        Dim oContentTableColumn As ContentTableColumn
        For Each oContentTableColumn In oContentTableColumns
            If oContentTableColumn.InternalName = "Material_General" Then
                columnExists = True
                Exit For
            End If
        Next
        
        ' Add the column if it doesn't exist
        If Not columnExists Then
            Dim oNewCol As ContentTableColumn
            Set oNewCol = oContentTableColumns.Add("Material_General", "Material - General", kStringType)
        End If
        
        ' Modify cell values
        Dim oRow As ContentTableRow
        For Each oRow In family.TableRows
            ' Cell value of new column
            Select Case oRow.Item("Material").Value
                Case "304L", "316L", "304 SS"
                    oRow.Item("Material_General").Value = "Stainless Steel"
                Case "CS", "ZP", "Steel", "NICKEL PLATED", "FORGED STEEL"
                    oRow.Item("Material_General").Value = "Steel"
                Case "ALUMINUM"
                    oRow.Item("Material_General").Value = "Aluminum"
                Case "Brass"
                    oRow.Item("Material_General").Value = "Brass/Bronze"
                Case "CPVC", "PVC"
                    oRow.Item("Material_General").Value = "Plastic"
                Case "GALV"
                    oRow.Item("Material_General").Value = "Galvanized"
                Case "FIBERGLASS"
                    oRow.Item("Material_General").Value = "Fiberglass"
            End Select
        Next
        
        ' Save changes
        Call family.Save
    Next

End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 13:20:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/content-center-add-columns/m-p/13389484#M1213</guid>
      <dc:creator>KWarrenCA</dc:creator>
      <dc:date>2025-03-25T13:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Content Center Add Columns</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/content-center-add-columns/m-p/13389655#M1214</link>
      <description>&lt;P&gt;I was able to figure it out. Using the following code will add a custom property for the column.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;' Set the custom property using a different method
                        Dim propSetId As String
                        Dim propIdentifier As Variant
                        propSetId = "Custom"
                        propIdentifier = "Material - General"
                        Call oNewCol.SetPropertyMap(propSetId, propIdentifier)
                    End If&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 25 Mar 2025 14:36:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/content-center-add-columns/m-p/13389655#M1214</guid>
      <dc:creator>KWarrenCA</dc:creator>
      <dc:date>2025-03-25T14:36:36Z</dc:date>
    </item>
  </channel>
</rss>

