<?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 iLogic to renumber partlist in assembly in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-renumber-partlist-in-assembly/m-p/7446913#M97274</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;I am searching for a code snipped to renumber the partlist in an assembly with start by 1 and ingrement by 1.&lt;BR /&gt;I only found some codes for the partlist in drawing documents.&lt;BR /&gt;&lt;BR /&gt;Anyone who already uses something like that?&lt;/P&gt;</description>
    <pubDate>Tue, 10 Oct 2017 07:06:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-10-10T07:06:46Z</dc:date>
    <item>
      <title>iLogic to renumber partlist in assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-renumber-partlist-in-assembly/m-p/7446913#M97274</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I am searching for a code snipped to renumber the partlist in an assembly with start by 1 and ingrement by 1.&lt;BR /&gt;I only found some codes for the partlist in drawing documents.&lt;BR /&gt;&lt;BR /&gt;Anyone who already uses something like that?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 07:06:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-renumber-partlist-in-assembly/m-p/7446913#M97274</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-10T07:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to renumber partlist in assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-renumber-partlist-in-assembly/m-p/7446936#M97275</link>
      <description>&lt;P&gt;Look in Inventor, in the API help,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can use this&lt;/P&gt;
&lt;P&gt;BOMView.Renumber Method BOMView.&lt;STRONG&gt;&lt;FONT style="background-color: #0078d7;" color="#ffffff"&gt;Renumber&lt;/FONT&gt;&lt;/STRONG&gt;( [&lt;STRONG&gt;&lt;I&gt;StartValue&lt;/I&gt;&lt;/STRONG&gt;] As Long, [&lt;STRONG&gt;&lt;I&gt;Increment&lt;/I&gt;&lt;/STRONG&gt;] As Long, [&lt;STRONG&gt;&lt;I&gt;BOMRowsToRenumber&lt;/I&gt;&lt;/STRONG&gt;] As Variant )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;also from the help:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using the BOM APIs API Sample&lt;/P&gt;
&lt;TABLE class="code"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="code"&gt;
&lt;PRE&gt;&lt;SPAN style="color: blue;"&gt;' Set a reference to the assembly document.&lt;/SPAN&gt;
    &lt;SPAN style="color: blue;"&gt;' This assumes an assembly document is active.&lt;/SPAN&gt;
    Dim oDoc As AssemblyDocument
    oDoc = ThisApplication.ActiveDocument

    Dim FirstLevelOnly As Boolean
    If MsgBox("First level only?", vbYesNo) = vbYes Then
        FirstLevelOnly = True
    Else
        FirstLevelOnly = False
    End If
    
    &lt;SPAN style="color: blue;"&gt;' Set a reference to the BOM&lt;/SPAN&gt;
    Dim oBOM As BOM
    oBOM = oDoc.ComponentDefinition.BOM
    
    &lt;SPAN style="color: blue;"&gt;' Set whether first level only or all levels.&lt;/SPAN&gt;
    If FirstLevelOnly Then
        oBOM.StructuredViewFirstLevelOnly = True
    Else
        oBOM.StructuredViewFirstLevelOnly = False
    End If
    
    &lt;SPAN style="color: blue;"&gt;' Make sure that the structured view is enabled.&lt;/SPAN&gt;
    oBOM.StructuredViewEnabled = True
    
    &lt;SPAN style="color: blue;"&gt;'Set a reference to the "Structured" BOMView&lt;/SPAN&gt;
    Dim oBOMView As BOMView
     oBOMView = oBOM.BOMViews.Item("Structured")&lt;BR /&gt;&lt;BR /&gt;
&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Tue, 10 Oct 2017 07:16:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-renumber-partlist-in-assembly/m-p/7446936#M97275</guid>
      <dc:creator>HermJan.Otterman</dc:creator>
      <dc:date>2017-10-10T07:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to renumber partlist in assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-renumber-partlist-in-assembly/m-p/7449314#M97276</link>
      <description>&lt;P&gt;This one works for me... (Frankensteined from&amp;nbsp;@Anonymous&amp;nbsp;and others)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can sort by anything in the list: "0" is descending, "1" is ascending.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'sort parts list by PART NUMBER
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument

Dim oPartsList As PartsList
oPartsList = oDrawDoc.ActiveSheet.PartsLists.Item(1)

If Not oPartsList Is Nothing Then &lt;BR /&gt;'sort by part number
  Call oPartsList.Sort("PART NUMBER", 1, "ITEM QTY", 1)&lt;BR /&gt;'renumber the parts list
  oPartsList.Renumber &lt;BR /&gt;'save overrides to BOM
  oPartsList.SaveItemOverridesToBOM 
End If&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 21:22:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-renumber-partlist-in-assembly/m-p/7449314#M97276</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-10T21:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to renumber partlist in assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-renumber-partlist-in-assembly/m-p/7449923#M97277</link>
      <description>&lt;P&gt;First of all thanks for the help. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Herman, your code does resort the partlist in assemblies with a structure, but it doesnt renumber the items (parts). Maybe the info in the api can help. Hopefully it does. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Curtis code renumber the parts, but only in drawings. I have no drawing for the assembly, because we export the partlist as excel sheets.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 04:44:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-renumber-partlist-in-assembly/m-p/7449923#M97277</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-11T04:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic to renumber partlist in assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-renumber-partlist-in-assembly/m-p/7449932#M97278</link>
      <description>&lt;P&gt;With Hermans code snipped I found the correct code in the forum to renumber the parts in assembly.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/bomview-renumber/td-p/6885184" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/bomview-renumber/td-p/6885184&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 04:52:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-to-renumber-partlist-in-assembly/m-p/7449932#M97278</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-11T04:52:47Z</dc:date>
    </item>
  </channel>
</rss>

