<?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: Matching item #'s in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8016425#M88759</link>
    <description>&lt;P&gt;Hi Andrew,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes this request is on our radar (as indicated by the "Future Consideration" status).&amp;nbsp; However it is not on any list for short term consideration.&amp;nbsp; We will definitely keep you in mind for validation if the wheels on this one start turning...&lt;/P&gt;
&lt;P&gt;As always, thanks.&lt;/P&gt;
&lt;P&gt;-Dan&lt;/P&gt;</description>
    <pubDate>Mon, 21 May 2018 21:03:17 GMT</pubDate>
    <dc:creator>dan_szymanski</dc:creator>
    <dc:date>2018-05-21T21:03:17Z</dc:date>
    <item>
      <title>Matching item #'s</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8003908#M88754</link>
      <description>&lt;P&gt;I'm wanting to make an iLogic rule that will look at an assembly BOM and match the item number from&amp;nbsp;a sub assembly to the assembly BOM.&amp;nbsp; I was just wondering if anyone had already attempted this and if it is even possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a link to an Inventor forum topic describing what I'm trying to do.&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-forum/matching-item-numbers-for-multi-level-bom/m-p/7996328#M694860" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-forum/matching-item-numbers-for-multi-level-bom/m-p/7996328#M694860&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 18:59:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8003908#M88754</guid>
      <dc:creator>andrewiv</dc:creator>
      <dc:date>2018-05-15T18:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Matching item #'s</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8005330#M88755</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/242037"&gt;@andrewiv&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hoping that below iLogic code may help.&lt;/P&gt;
&lt;PRE&gt;Sub Main()
    Dim asm As AssemblyDocument
    asm = ThisApplication.ActiveDocument

    Dim b As BOM
    b = asm.ComponentDefinition.BOM

    b.StructuredViewDelimiter = ""

    b.StructuredViewEnabled = True

    Dim bv As BOMView
    bv = b.BOMViews("Structured")
    Dim cnt As Integer

    Call RenameItemNumber(bv.BOMRows, cnt)

End Sub

Sub RenameItemNumber(rows As BOMRowsEnumerator, ByRef cnt As Integer)
    Dim row As BOMRow
    Dim i As Integer

    For i = 1 To rows.Count Step 1
        cnt = cnt + 1
        row = rows.Item(i)
        row.ItemNumber = cnt.ToString
        If Not row.ChildRows Is Nothing Then
            RenameItemNumber(row.ChildRows, cnt)
        End If
    Next
End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BOM before running code" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/501118iB4E729A80ED3ADC6/image-size/large?v=v2&amp;amp;px=999" role="button" title="BOM_before.PNG" alt="BOM before running code" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;BOM before running code&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BOM after running code" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/501119iB534336310925741/image-size/large?v=v2&amp;amp;px=999" role="button" title="BOM_After.PNG" alt="BOM after running code" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;BOM after running code&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 09:48:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8005330#M88755</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2018-05-16T09:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Matching item #'s</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8005605#M88756</link>
      <description>&lt;P&gt;That's not exactly what I'm looking for.&amp;nbsp; I would like to look at the item #'s in the sub assembly BOM and make the number after the period match in the top assembly, then sort the BOM by the item #.&amp;nbsp; If I could put the part numbers in the same order and then renumber the whole BOM that would be the same thing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Top level before" style="width: 698px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/501172i39CC52D99CEFD317/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="Top level before" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Top level before&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sub assembly BOM" style="width: 698px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/501173i4BBF0AE9ACFA22D7/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="Sub assembly BOM" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Sub assembly BOM&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="What I want the Top level to look like after" style="width: 698px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/501174iC6C4BEB728D3DFB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="What I want the Top level to look like after" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;What I want the Top level to look like after&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 12:02:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8005605#M88756</guid>
      <dc:creator>andrewiv</dc:creator>
      <dc:date>2018-05-16T12:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Matching item #'s</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8008497#M88757</link>
      <description>&lt;P&gt;Here is VBA sample to do this, it just consider one level&amp;nbsp;sub assembly in the top assembly, you can change it if you have multiple levels:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub SyncBOMRowOrderFromSubAssembly()
    Dim oDoc As AssemblyDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    Dim oBOM As BOM
    Set oBOM = oDoc.ComponentDefinition.BOM
    oBOM.StructuredViewEnabled = True
    
    Dim oStructedView As BOMView
    Set oStructedView = oBOM.BOMViews("Structured")
    
    Dim oRow As BOMRow, oChildRow As BOMRow
    Dim oSubDoc As AssemblyDocument, oSubBOM As BOM, oSubStructedView As BOMView, oSubRow As BOMRow
    Dim sItemNum() As String, sUpdateItemNum As String
    For Each oRow In oStructedView.BOMRows
        If oRow.ComponentDefinitions.Item(1).Type = kAssemblyComponentDefinitionObject Then
            If oRow.ChildRows.Count &amp;gt; 1 Then
                Set oSubDoc = oRow.ComponentDefinitions(1).Document
                Set oSubBOM = oSubDoc.ComponentDefinition.BOM
                oSubBOM.StructuredViewEnabled = True
                
                Set oSubStructedView = oSubBOM.BOMViews("Structured")
                
                For Each oSubRow In oSubStructedView.BOMRows
                    For Each oChildRow In oRow.ChildRows
                        Debug.Print oChildRow.ReferencedFileDescriptor.FullFileName
                        If StrComp(LCase(oSubRow.ReferencedFileDescriptor.FullFileName), LCase(oChildRow.ReferencedFileDescriptor.FullFileName)) = 0 Then
                            sItemNum = Split(oChildRow.ItemNumber, ".")
                            oChildRow.ItemNumber = oSubRow.ItemNumber
                            Exit For
                        End If
                    Next
                Next
            End If
        End If
    Next
    
    oStructedView.Sort "Item", True
End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it works for you.&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 11:27:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8008497#M88757</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2018-05-17T11:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Matching item #'s</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8011218#M88758</link>
      <description>&lt;P&gt;Thank you for the code.&amp;nbsp; I do need it to go deeper than 2 levels, but I can tweak it myself to accomplish that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if this was on the radar for implementation in the base product.&amp;nbsp;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/117694"&gt;@dan_szymanski&lt;/a&gt;&amp;nbsp;can you comment on this?&amp;nbsp; I would be more than willing to work with Autodesk to beta test or provide input on functionality.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a link to an idea that was posted and one of the comments in there is that there should be an application option to enable parametric operation between a single level and a multi level BOM.&amp;nbsp; I think that this would solve the issue and still retain the current functionality if anyone needs to use it as it is today.&lt;/P&gt;&lt;P&gt;&lt;A title="https://forums.autodesk.com/t5/inventor-ideas/assembly-bom-propagate-item-number-to-children/idi-p/4571949" href="https://forums.autodesk.com/t5/inventor-ideas/assembly-bom-propagate-item-number-to-children/idi-p/4571949" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-ideas/assembly-bom-propagate-item-number-to-children/idi-p/4571949&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 12:09:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8011218#M88758</guid>
      <dc:creator>andrewiv</dc:creator>
      <dc:date>2018-05-18T12:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Matching item #'s</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8016425#M88759</link>
      <description>&lt;P&gt;Hi Andrew,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes this request is on our radar (as indicated by the "Future Consideration" status).&amp;nbsp; However it is not on any list for short term consideration.&amp;nbsp; We will definitely keep you in mind for validation if the wheels on this one start turning...&lt;/P&gt;
&lt;P&gt;As always, thanks.&lt;/P&gt;
&lt;P&gt;-Dan&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2018 21:03:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8016425#M88759</guid>
      <dc:creator>dan_szymanski</dc:creator>
      <dc:date>2018-05-21T21:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Matching item #'s</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8558591#M88760</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/532715"&gt;@YuhanZhang&lt;/a&gt;&amp;nbsp;/&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/242037"&gt;@andrewiv&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could the code above be adapted to work with a top-level assembly that uses the Parts Only tab instead of the Structured tab? The top-level assembly would contain subassemblies and parts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After creating a subassembly view, we would like the balloon number (item) of a component to match the item number at the top-level. I appreciate the complexity of this request. I am hoping some code can eliminate the repetitive, manual item number overrides required.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our current "workaround" is to create multiple views of the top-level assembly and use ViewReps to show just the subassembly we want to document.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your time and attention. I look forward to your replies.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jerry&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jan 2019 16:50:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8558591#M88760</guid>
      <dc:creator>JBerns</dc:creator>
      <dc:date>2019-01-29T16:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Matching item #'s</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8560001#M88761</link>
      <description>&lt;P&gt;Hi Jerry,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code sample is just working for the Structured BOM view and with one level sub assembly in the top assembly. If you want to handle the Parts Only BOM view you need to modify it somewhat to just query the Parts Only BOM view instead, and the components in Parts Only BOM view is flat so it is simpler than the Structured. Then you can just query the component's Item Number in the Parts Only BOM view and update the Balloon in drawing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this clears.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jan 2019 03:29:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8560001#M88761</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2019-01-30T03:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Matching item #'s</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8614246#M88762</link>
      <description>&lt;P&gt;Acknowledged. Thanks, Rocky.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jerry&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 13:22:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/matching-item-s/m-p/8614246#M88762</guid>
      <dc:creator>JBerns</dc:creator>
      <dc:date>2019-02-22T13:22:46Z</dc:date>
    </item>
  </channel>
</rss>

