<?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: Add a column to a partslist in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-a-column-to-a-partslist/m-p/3803358#M162511</link>
    <description>&lt;P&gt;I know it's an old thread, but have you then solved the problem on how to add a new custom property and read the properties values?&lt;/P&gt;</description>
    <pubDate>Wed, 13 Mar 2013 01:23:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-03-13T01:23:21Z</dc:date>
    <item>
      <title>Add a column to a partslist</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-a-column-to-a-partslist/m-p/1391401#M162508</link>
      <description>I need to add a custom column to a parts list&lt;BR /&gt;
and have it display as the last column.&lt;BR /&gt;
&lt;BR /&gt;
oPartsList.PartsListColumns.Add (kCustomProperty)&lt;BR /&gt;
&lt;BR /&gt;
This code runs, but nothing happens...no error...no column...&lt;BR /&gt;
&lt;BR /&gt;
Any suggestions?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Victor</description>
      <pubDate>Thu, 28 Jul 2005 17:36:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/add-a-column-to-a-partslist/m-p/1391401#M162508</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-28T17:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Add a column to a partslist</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-a-column-to-a-partslist/m-p/1391402#M162509</link>
      <description>Hi Victor,&lt;BR /&gt;
&lt;BR /&gt;
As per online help it requires PropID arg when you use kCustomProp.&lt;BR /&gt;
&lt;BR /&gt;
Try something similar to the following code:&lt;BR /&gt;
&lt;BR /&gt;
Sub AddCustomProperty()&lt;BR /&gt;
    ' Assuming the current active document is Drawing&lt;BR /&gt;
    Dim oDrawDoc As DrawingDocument&lt;BR /&gt;
    Set oDrawDoc = ThisApplication.ActiveDocument&lt;BR /&gt;
    &lt;BR /&gt;
    Dim oSheet As Sheet&lt;BR /&gt;
    Set oSheet = oDrawDoc.ActiveSheet&lt;BR /&gt;
    &lt;BR /&gt;
    ' Assuming there is at least one partslist on the activesheet&lt;BR /&gt;
    Dim oPL As PartsList&lt;BR /&gt;
    Set oPL = oSheet.PartsLists(1)&lt;BR /&gt;
    &lt;BR /&gt;
    ' Create a custom PropertySet &amp;amp; Property&lt;BR /&gt;
    Dim oPropSet As PropertySet&lt;BR /&gt;
    Set oPropSet = oDrawDoc.PropertySets.Add("Custom BOM Props")&lt;BR /&gt;
    &lt;BR /&gt;
    Dim oProp As Property, vPropVal As Variant&lt;BR /&gt;
    Set oProp = oPropSet.Add("Yes", "Purchased")&lt;BR /&gt;
    &lt;BR /&gt;
    ' Create the custom column&lt;BR /&gt;
    Dim oPLCol As PartsListColumn&lt;BR /&gt;
    Set oPLCol = oPL.PartsListColumns.Add(kCustomProperty, , oProp.PropId)&lt;BR /&gt;
    &lt;BR /&gt;
    oPLCol.Title = "Purchased"&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Thanks.&lt;BR /&gt;
&lt;BR /&gt;
-Sonny N&lt;BR /&gt;
(Autodesk)</description>
      <pubDate>Fri, 29 Jul 2005 00:23:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/add-a-column-to-a-partslist/m-p/1391402#M162509</guid>
      <dc:creator>SonnyN</dc:creator>
      <dc:date>2005-07-29T00:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Add a column to a partslist</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-a-column-to-a-partslist/m-p/1391403#M162510</link>
      <description>Your sample allows me to add custom properties to a parts list. I need 3 additional columns &amp;amp; the related parameter values (dimensions that I defined in each of my parts). Using your code, I can add the 3 extra columns I need, but can't figure out how to assign the parameter values I need (and have stored for the parts) to them.&lt;BR /&gt;
*** Code below ***&lt;BR /&gt;
&lt;BR /&gt;
        '  Assuming there is at least one partslist on the activesheet&lt;BR /&gt;
        Dim oPL As PartsList&lt;BR /&gt;
        oPL = oSheet.PartsLists(1)&lt;BR /&gt;
&lt;BR /&gt;
        ' Create a custom PropertySet &amp;amp; Property&lt;BR /&gt;
        Dim oPropSet As PropertySet&lt;BR /&gt;
        oPropSet = oDrawDoc.PropertySets.Add("plist_columns")&lt;BR /&gt;
&lt;BR /&gt;
        Dim oProp1 As Inventor.Property&lt;BR /&gt;
        Dim oProp2 As Inventor.Property&lt;BR /&gt;
        Dim oProp3 As Inventor.Property&lt;BR /&gt;
        Dim vPropVal As Object&lt;BR /&gt;
&lt;BR /&gt;
        oProp1 = oPropSet.Add("", "Length1")&lt;BR /&gt;
        oProp2 = oPropSet.Add("", "Width1")&lt;BR /&gt;
        oProp3 = oPropSet.Add("", "Thickness1")&lt;BR /&gt;
&lt;BR /&gt;
        ' Create the custom column&lt;BR /&gt;
        Dim oPLCol As PartsListColumn&lt;BR /&gt;
        oPLCol = oPL.PartsListColumns.Add(PropertyTypeEnum.kCustomProperty, , oProp1.PropId)&lt;BR /&gt;
        oPLCol.Title = "Length1"&lt;BR /&gt;
        oPLCol = oPL.PartsListColumns.Add(PropertyTypeEnum.kCustomProperty, , oProp2.PropId)&lt;BR /&gt;
        oPLCol.Title = "Width1"&lt;BR /&gt;
        oPLCol = oPL.PartsListColumns.Add(PropertyTypeEnum.kCustomProperty, , oProp3.PropId)&lt;BR /&gt;
        oPLCol.Title = "Thickness1"</description>
      <pubDate>Fri, 29 Aug 2008 17:40:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/add-a-column-to-a-partslist/m-p/1391403#M162510</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-08-29T17:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Add a column to a partslist</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-a-column-to-a-partslist/m-p/3803358#M162511</link>
      <description>&lt;P&gt;I know it's an old thread, but have you then solved the problem on how to add a new custom property and read the properties values?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2013 01:23:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/add-a-column-to-a-partslist/m-p/3803358#M162511</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-13T01:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add a column to a partslist</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/add-a-column-to-a-partslist/m-p/3809577#M162512</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;&lt;A id="link_13d855ead27" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/974581" target="_self"&gt;dbrizio&lt;/A&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I think the&amp;nbsp;PartsListColumns.Add is still the method to add column of custom property. Did you meet any specific problem? Could you provide a demo code?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2013 01:19:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/add-a-column-to-a-partslist/m-p/3809577#M162512</guid>
      <dc:creator>xiaodong_liang</dc:creator>
      <dc:date>2013-03-20T01:19:00Z</dc:date>
    </item>
  </channel>
</rss>

