<?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 Custom iProperty reading on component occurrence causing Inventor Crash? in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-iproperty-reading-on-component-occurrence-causing/m-p/10702927#M130346</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing an Inventor API error while trying to read a custom iProperty from a component occurrence. Has someone experienced a similar issue before on Inventor 2020.3.4?&lt;/P&gt;&lt;P&gt;This is happening both when the Inventor session is shown and hidden.&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="amitabhVA4SD_1-1634786749962.png" style="width: 529px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/979824iC5D71B600B1BCA36/image-dimensions/529x212?v=v2" width="529" height="212" role="button" title="amitabhVA4SD_1-1634786749962.png" alt="amitabhVA4SD_1-1634786749962.png" /&gt;&lt;/span&gt;&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="amitabhVA4SD_2-1634786821866.png" style="width: 604px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/979825i5ED7C1960C531D2B/image-dimensions/604x228?v=v2" width="604" height="228" role="button" title="amitabhVA4SD_2-1634786821866.png" alt="amitabhVA4SD_2-1634786821866.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inventor API Team and Experts please help&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537534" target="_blank" rel="noopener"&gt;@MjDeck&lt;/A&gt; &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/486618"&gt;@johnsonshiue&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/486618"&gt;@johnsonshiue&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Amitabh Mukherjee&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Oct 2021 03:38:18 GMT</pubDate>
    <dc:creator>amitabhVA4SD</dc:creator>
    <dc:date>2021-10-21T03:38:18Z</dc:date>
    <item>
      <title>Custom iProperty reading on component occurrence causing Inventor Crash?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-iproperty-reading-on-component-occurrence-causing/m-p/10702927#M130346</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing an Inventor API error while trying to read a custom iProperty from a component occurrence. Has someone experienced a similar issue before on Inventor 2020.3.4?&lt;/P&gt;&lt;P&gt;This is happening both when the Inventor session is shown and hidden.&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="amitabhVA4SD_1-1634786749962.png" style="width: 529px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/979824iC5D71B600B1BCA36/image-dimensions/529x212?v=v2" width="529" height="212" role="button" title="amitabhVA4SD_1-1634786749962.png" alt="amitabhVA4SD_1-1634786749962.png" /&gt;&lt;/span&gt;&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="amitabhVA4SD_2-1634786821866.png" style="width: 604px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/979825i5ED7C1960C531D2B/image-dimensions/604x228?v=v2" width="604" height="228" role="button" title="amitabhVA4SD_2-1634786821866.png" alt="amitabhVA4SD_2-1634786821866.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inventor API Team and Experts please help&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537534" target="_blank" rel="noopener"&gt;@MjDeck&lt;/A&gt; &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/486618"&gt;@johnsonshiue&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/486618"&gt;@johnsonshiue&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Amitabh Mukherjee&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 03:38:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-iproperty-reading-on-component-occurrence-causing/m-p/10702927#M130346</guid>
      <dc:creator>amitabhVA4SD</dc:creator>
      <dc:date>2021-10-21T03:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Custom iProperty reading on component occurrence causing Inventor Crash?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-iproperty-reading-on-component-occurrence-causing/m-p/10703146#M130350</link>
      <description>&lt;P&gt;This doesn't look like a general issue. Because this part of Inventor API is well tested and used by many users.&lt;/P&gt;&lt;P&gt;Can you provide some minimal dataset where the error occurs?&lt;/P&gt;&lt;P&gt;Try to check what kind of occurrence you have as input. Because this can be some strange type. For example virtual component, weld bead in weldment assembly, iPart/iAssembly instance etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW please put code sample as text instead of print screen.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 06:37:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-iproperty-reading-on-component-occurrence-causing/m-p/10703146#M130350</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2021-10-21T06:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Custom iProperty reading on component occurrence causing Inventor Crash?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-iproperty-reading-on-component-occurrence-causing/m-p/10705395#M130387</link>
      <description>&lt;P&gt;&lt;FONT face="Verdana"&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1104556"&gt;@Michael.Navara&lt;/a&gt;&amp;nbsp; - Exploring the issue with reading iProperties in the case of the tool assembly,&lt;BR /&gt;We have found that if the &lt;FONT color="#ff0000"&gt;LOD representation is CLEAN,&lt;/FONT&gt; irrespective of inventor session visible or invisible mode, the exception is being reported out for a few occurrences in the assembly. We are trying to list out the specific occurrences where the error is popping out. There are no unresolved parts when the LOD is clean and no out-of-date parts as well.&lt;BR /&gt;In the case of &lt;FONT color="#ff0000"&gt;LOD representation&amp;nbsp; Master, &lt;/FONT&gt;there is no exception in Inventor&lt;BR /&gt;&lt;/FONT&gt;&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="amitabhVA4SD_0-1634860586479.png" style="width: 747px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/980314i7DD92F28757FC24B/image-dimensions/747x435?v=v2" width="747" height="435" role="button" title="amitabhVA4SD_0-1634860586479.png" alt="amitabhVA4SD_0-1634860586479.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Amitabh Mukherjee&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 23:58:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-iproperty-reading-on-component-occurrence-causing/m-p/10705395#M130387</guid>
      <dc:creator>amitabhVA4SD</dc:creator>
      <dc:date>2021-10-21T23:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Custom iProperty reading on component occurrence causing Inventor Crash?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-iproperty-reading-on-component-occurrence-causing/m-p/10705747#M130394</link>
      <description>&lt;P&gt;That's it. Because in LOD some documents are not loaded in memory. In this case you are not able to read anything from this documents.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 05:21:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-iproperty-reading-on-component-occurrence-causing/m-p/10705747#M130394</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2021-10-22T05:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Custom iProperty reading on component occurrence causing Inventor Crash?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-iproperty-reading-on-component-occurrence-causing/m-p/10706468#M130406</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1104556"&gt;@Michael.Navara&lt;/a&gt;- We are opening the Assembly in "Load Full" mode. Why would some documents be not loaded in CLEAN LOD but loaded in MASTER LOD? Is there a particular API that we can use to check if the AssemblyDocument or PartDocument is loaded?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 11:36:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-iproperty-reading-on-component-occurrence-causing/m-p/10706468#M130406</guid>
      <dc:creator>amitabhVA4SD</dc:creator>
      <dc:date>2021-10-22T11:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Custom iProperty reading on component occurrence causing Inventor Crash?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-iproperty-reading-on-component-occurrence-causing/m-p/10709076#M130445</link>
      <description>&lt;P&gt;If something is not loaded because LOD then usually that means that the occurrence is suppressed in the LOD. You can easily check this.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;if (compOccurrence.Suppressed)
{
    throw new Exception($"{compOccurrence._DisplayName} is suppressed!");
}
Document doc = (Document)compOccurrence.Definition.Document;
PropertySet customPropSet = doc.PropertySets["nventor User Defined Properties"];
            
try
{
    Property iProperty = customPropSet["V_01_PART_TYPE"];
    string value = iProperty.Value.ToString();
    if (string.IsNullOrEmpty(value) return false;
    if (!value.Equals("SINGLE_DETAIL", StringComparison.InvariantCultureIgnoreCase) return false;
    return true;
    }
catch (Exception)
{
    return false;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Oct 2021 20:12:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-iproperty-reading-on-component-occurrence-causing/m-p/10709076#M130445</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2021-10-23T20:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Custom iProperty reading on component occurrence causing Inventor Crash?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-iproperty-reading-on-component-occurrence-causing/m-p/10710188#M130452</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt;- Really appreciate the updated code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We did some more digging and found that in the Clean LOD representation, there are missing references which is causing the exception&lt;/P&gt;&lt;P&gt;What I was surprised to see is that we are able to open the iProperty dialog on the Parent node manually but not using code. There must be some use-case that is not properly handled in the Inventor APIs.&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="amitabhVA4SD_1-1635095772631.png" style="width: 794px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/981127iD77342DBCBAEDCDE/image-dimensions/794x282?v=v2" width="794" height="282" role="button" title="amitabhVA4SD_1-1635095772631.png" alt="amitabhVA4SD_1-1635095772631.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Amitabh Mukherjee&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Oct 2021 17:17:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/custom-iproperty-reading-on-component-occurrence-causing/m-p/10710188#M130452</guid>
      <dc:creator>amitabhVA4SD</dc:creator>
      <dc:date>2021-10-24T17:17:38Z</dc:date>
    </item>
  </channel>
</rss>

