<?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: Error accessing BOMStructure of weldment occurrence in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-accessing-bomstructure-of-weldment-occurrence/m-p/8499552#M92870</link>
    <description>&lt;P&gt;What did you define bomStruc as?&amp;nbsp; It should be of type BOMStructureEnum, but I can't verify that from your snippet.&amp;nbsp; The other question, is the system attempting to report a BOMStructureEnum value that is not in the Enum list? 51969-51975.&amp;nbsp; Welded parts are generally (by default) 51974 - Inseparable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For it to say E_NotImplemented means the API is being asked to do something that wasn't completely written for it.&amp;nbsp; But this feature has been around in version 10, so that shouldn't be the case.&amp;nbsp; Unless they broke something, or your document is somehow corrupted, and in the process of getting that value, it runs into a sub-error that bubbles up as shown.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To aide in removing corruption from the equation, use the total-rebuild feature on all documents (or do a migration with total-rebuild feature turned on).&amp;nbsp; If possible it would be helpful to see a copy of the document with the welded structure that is failing.&amp;nbsp; Perhaps if only a single set of 2 parts and a single weld (if that also fails).&amp;nbsp; We can use that to dive deeper with you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jan 2019 22:54:21 GMT</pubDate>
    <dc:creator>JamieVJohnson2</dc:creator>
    <dc:date>2019-01-03T22:54:21Z</dc:date>
    <item>
      <title>Error accessing BOMStructure of weldment occurrence</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-accessing-bomstructure-of-weldment-occurrence/m-p/8499489#M92867</link>
      <description>&lt;P&gt;I'm getting an error when trying to query the BOMStructure of a weldment assembly occurrence.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For Each oCompOcc As ComponentOccurrence in oOccs&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bomStruc = oCompOcc.Definition.BOMStructure&lt;/P&gt;
&lt;P&gt;Catch&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; msgbox(oCompOcc.Name)&lt;/P&gt;
&lt;P&gt;End Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get a message box for every weldment assembly the loop encounters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error Message:&lt;/P&gt;
&lt;P&gt;Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 22:25:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-accessing-bomstructure-of-weldment-occurrence/m-p/8499489#M92867</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-03T22:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Error accessing BOMStructure of weldment occurrence</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-accessing-bomstructure-of-weldment-occurrence/m-p/8499552#M92870</link>
      <description>&lt;P&gt;What did you define bomStruc as?&amp;nbsp; It should be of type BOMStructureEnum, but I can't verify that from your snippet.&amp;nbsp; The other question, is the system attempting to report a BOMStructureEnum value that is not in the Enum list? 51969-51975.&amp;nbsp; Welded parts are generally (by default) 51974 - Inseparable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For it to say E_NotImplemented means the API is being asked to do something that wasn't completely written for it.&amp;nbsp; But this feature has been around in version 10, so that shouldn't be the case.&amp;nbsp; Unless they broke something, or your document is somehow corrupted, and in the process of getting that value, it runs into a sub-error that bubbles up as shown.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To aide in removing corruption from the equation, use the total-rebuild feature on all documents (or do a migration with total-rebuild feature turned on).&amp;nbsp; If possible it would be helpful to see a copy of the document with the welded structure that is failing.&amp;nbsp; Perhaps if only a single set of 2 parts and a single weld (if that also fails).&amp;nbsp; We can use that to dive deeper with you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 22:54:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-accessing-bomstructure-of-weldment-occurrence/m-p/8499552#M92870</guid>
      <dc:creator>JamieVJohnson2</dc:creator>
      <dc:date>2019-01-03T22:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error accessing BOMStructure of weldment occurrence</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-accessing-bomstructure-of-weldment-occurrence/m-p/8499663#M92872</link>
      <description>&lt;P&gt;Hi Jamie, thanks for your input.&lt;/P&gt;
&lt;P&gt;I think I discovered the problem. I'm looping through AllLeafOccurrences, which should only include parts, but I've discovered it also includes weldment assemblies.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-01-04_13h37_24.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/587039iB182ECE46501043E/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-01-04_13h37_24.png" alt="2019-01-04_13h37_24.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was trying to access the BOMStructure through the component definition on an object of type ComponentOccurrenceProxy. When my loop encountered any weldment, it produced the error previously mentioned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if I access it via the occurrence itself (ComponentOccurrence.BOMStructure) it works fine, no error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I dislike looping through occurrences, I much prefer looping through AllReferencedDocuments, but I need to query the suppression state of each document and I'm unaware of anyway to achieve this other than though the occurrence object (ComponentOccurrence.Suppressed).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea if its possible to do via the referenced document?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 00:51:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/error-accessing-bomstructure-of-weldment-occurrence/m-p/8499663#M92872</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-04T00:51:24Z</dc:date>
    </item>
  </channel>
</rss>

