<?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 Bug - Cannot change the BOM structure of an assembly in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-bug-cannot-change-the-bom-structure-of-an-assembly/m-p/7466963#M75870</link>
    <description>&lt;P&gt;There seems to be a bug in iLogic in that it can't change the BOM structure in an assembly. It can read it but not modify it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried numerous methods of changing it. One example is below, the code below works perfectly in VBA but does not work in iLogic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Public Sub AssyBOMTest()
   Dim oDoc As Document
   Set oDoc = ThisApplication.ActiveDocument
   Dim oCompDef As ComponentDefinition
   Set oCompDef = oDoc.ComponentDefinition
   oCompDef.BOMStructure = kPurchasedBOMStructure
End Sub&lt;/PRE&gt;
&lt;P&gt;I came across this problem while trying to solve the issue for someone else but wanted to make a post addressing the issue directly.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/microsoft-net-error/m-p/7465590/highlight/false#M75850" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/microsoft-net-error/m-p/7465590/highlight/false#M75850&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If anyone can help that would be great.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks, Matt.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Oct 2017 12:39:06 GMT</pubDate>
    <dc:creator>matt_jlt</dc:creator>
    <dc:date>2017-10-17T12:39:06Z</dc:date>
    <item>
      <title>iLogic Bug - Cannot change the BOM structure of an assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-bug-cannot-change-the-bom-structure-of-an-assembly/m-p/7466963#M75870</link>
      <description>&lt;P&gt;There seems to be a bug in iLogic in that it can't change the BOM structure in an assembly. It can read it but not modify it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried numerous methods of changing it. One example is below, the code below works perfectly in VBA but does not work in iLogic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Public Sub AssyBOMTest()
   Dim oDoc As Document
   Set oDoc = ThisApplication.ActiveDocument
   Dim oCompDef As ComponentDefinition
   Set oCompDef = oDoc.ComponentDefinition
   oCompDef.BOMStructure = kPurchasedBOMStructure
End Sub&lt;/PRE&gt;
&lt;P&gt;I came across this problem while trying to solve the issue for someone else but wanted to make a post addressing the issue directly.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/microsoft-net-error/m-p/7465590/highlight/false#M75850" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/microsoft-net-error/m-p/7465590/highlight/false#M75850&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If anyone can help that would be great.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks, Matt.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 12:39:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-bug-cannot-change-the-bom-structure-of-an-assembly/m-p/7466963#M75870</guid>
      <dc:creator>matt_jlt</dc:creator>
      <dc:date>2017-10-17T12:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Bug - Cannot change the BOM structure of an assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-bug-cannot-change-the-bom-structure-of-an-assembly/m-p/7467383#M75871</link>
      <description>&lt;P&gt;Based on the assosciated Imports and the languages, the required for enumerators are different.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In vba you can get away with just the enum, but in vb.net you need to put in the Enum Type.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The safest way across all languages is to just extract what the integer is and to use that instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is not a bug/ this behavior is well known.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try using the code below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main()
   Dim oDoc As Document
   oDoc = ThisApplication.ActiveDocument
   Dim oCompDef As ComponentDefinition
   oCompDef = oDoc.ComponentDefinition
   oCompDef.BOMStructure = BOMStructureEnum.kPurchasedBOMStructure
End Sub&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Oct 2017 14:25:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-bug-cannot-change-the-bom-structure-of-an-assembly/m-p/7467383#M75871</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-10-17T14:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Bug - Cannot change the BOM structure of an assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-bug-cannot-change-the-bom-structure-of-an-assembly/m-p/7468821#M75886</link>
      <description>&lt;P&gt;Hi Justin, thanks for your reply. It must have been an issue with the install as I had tested your suggestion previously and it didn't work. I tried a different machine this morning and it worked like a charm. I guess i'll have to run the reset inventor tool.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help, Matt.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 20:58:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-bug-cannot-change-the-bom-structure-of-an-assembly/m-p/7468821#M75886</guid>
      <dc:creator>matt_jlt</dc:creator>
      <dc:date>2017-10-17T20:58:31Z</dc:date>
    </item>
  </channel>
</rss>

