<?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: Cannot access fundamental API objects (e.g. MaterialManager) in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/cannot-access-fundamental-api-objects-e-g-materialmanager/m-p/13654393#M28</link>
    <description>&lt;P&gt;Oh my god the absolute betrayal I feel now... I guess that's what I get for trusting AI tools too much this early, but yeah it was written by AI&lt;BR /&gt;What I'm trying to do is loop through an excel spreadsheet and create materials in an existing library based on a template material, with small changes. Appreciate any guidance on existing resources to achieve this.&amp;nbsp;&lt;BR /&gt;Thanks Mat&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 May 2025 15:53:55 GMT</pubDate>
    <dc:creator>HishamWQ298</dc:creator>
    <dc:date>2025-05-28T15:53:55Z</dc:date>
    <item>
      <title>Cannot access fundamental API objects (e.g. MaterialManager)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/cannot-access-fundamental-api-objects-e-g-materialmanager/m-p/13652457#M26</link>
      <description>&lt;P&gt;Hello, hope you're doing well&lt;BR /&gt;I'm having some issues with iLogic scripts, specifically with accessing MaterialManager. The block in my script which calls them out is:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;    &lt;SPAN&gt;' Attempt to access MaterialManager&lt;/SPAN&gt;
    &lt;SPAN&gt;Try&lt;/SPAN&gt;
        &lt;SPAN&gt;oMaterialManager&lt;/SPAN&gt; = &lt;SPAN&gt;oApp&lt;/SPAN&gt;.&lt;SPAN&gt;MaterialManager&lt;/SPAN&gt;
        &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oMaterialManager&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
            &lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Test Result: MaterialManager is Nothing after trying to access it."&lt;/SPAN&gt;, &lt;SPAN&gt;MsgBoxStyle&lt;/SPAN&gt;.&lt;SPAN&gt;Critical&lt;/SPAN&gt;, &lt;SPAN&gt;"Debug: MaterialManager Test"&lt;/SPAN&gt;)
            &lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
        &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
    &lt;SPAN&gt;Catch&lt;/SPAN&gt; &lt;SPAN&gt;ex&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Exception&lt;/SPAN&gt;
        &lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Test Result: CRITICAL ERROR accessing MaterialManager from Application: "&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;ex&lt;/SPAN&gt;.&lt;SPAN&gt;Message&lt;/SPAN&gt;, &lt;SPAN&gt;MsgBoxStyle&lt;/SPAN&gt;.&lt;SPAN&gt;Critical&lt;/SPAN&gt;, &lt;SPAN&gt;"Debug: MaterialManager Test"&lt;/SPAN&gt;)
        &lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
    &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the script, I get the following error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HishamWQ298_0-1748384315261.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1537814i798E78B95F466781/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HishamWQ298_0-1748384315261.png" alt="HishamWQ298_0-1748384315261.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I imported &lt;STRONG&gt;Inventor&lt;/STRONG&gt; at the beginning of the script too&lt;/P&gt;&lt;P&gt;I can share the entire script but what would be the cause for such a fundamental issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Build: 162, Release: 2025.0.1 - Date: Mon 05/13/2024&lt;BR /&gt;&lt;BR /&gt;Thanks,&amp;nbsp;&lt;BR /&gt;Hisham&lt;/P&gt;</description>
      <pubDate>Tue, 27 May 2025 22:27:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/cannot-access-fundamental-api-objects-e-g-materialmanager/m-p/13652457#M26</guid>
      <dc:creator>HishamWQ298</dc:creator>
      <dc:date>2025-05-27T22:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot access fundamental API objects (e.g. MaterialManager)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/cannot-access-fundamental-api-objects-e-g-materialmanager/m-p/13653643#M27</link>
      <description>&lt;P&gt;Application.MaterialManager simply doesn't exist, as you can see here:&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=GUID-Application" target="_blank"&gt;https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=GUID-Application&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I suspect this code was written by AI, that often causes methods or properties that don't exist to be called. If you post what you're trying to to someone on this forum can probably guide you in the right direction.&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2025 11:18:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/cannot-access-fundamental-api-objects-e-g-materialmanager/m-p/13653643#M27</guid>
      <dc:creator>mat_hijs</dc:creator>
      <dc:date>2025-05-28T11:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot access fundamental API objects (e.g. MaterialManager)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/cannot-access-fundamental-api-objects-e-g-materialmanager/m-p/13654393#M28</link>
      <description>&lt;P&gt;Oh my god the absolute betrayal I feel now... I guess that's what I get for trusting AI tools too much this early, but yeah it was written by AI&lt;BR /&gt;What I'm trying to do is loop through an excel spreadsheet and create materials in an existing library based on a template material, with small changes. Appreciate any guidance on existing resources to achieve this.&amp;nbsp;&lt;BR /&gt;Thanks Mat&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2025 15:53:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/cannot-access-fundamental-api-objects-e-g-materialmanager/m-p/13654393#M28</guid>
      <dc:creator>HishamWQ298</dc:creator>
      <dc:date>2025-05-28T15:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot access fundamental API objects (e.g. MaterialManager)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/cannot-access-fundamental-api-objects-e-g-materialmanager/m-p/13654422#M29</link>
      <description>&lt;P&gt;In Inventor, specifications for both 'materials' and 'appearances' are stored in objects known as an assets.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=GUID-2912C0FB-885F-47ED-81C3-AF19584EA9C1" target="_blank" rel="noopener"&gt;Consistent Materials (Materials and Appearances)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What we do have is external asset libraries (each library is a single file in disk), and each model document can have its own collection assets.&lt;/P&gt;
&lt;P&gt;An asset library can store both materials and appearances in it at the same time, but they just store the specifications for those materials and appearances, and do not offer methods for creating new assets.&amp;nbsp; If we want to create a new asset, we have to either copy an existing one, then modify it, or use the&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=Assets_Add" target="_blank" rel="noopener"&gt;Assets.Add&lt;/A&gt;&amp;nbsp;method, which is only available from within an existing part document.&amp;nbsp; Once we create a local asset within a document, we can copy it up into an external asset library, which will make it available to all other documents using the&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=Asset_CopyTo" target="_blank" rel="noopener"&gt;Asset.CopyTo&lt;/A&gt;&amp;nbsp;method, and specifying the AssetLibrary object that we want to copy it into.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below are some links to the Inventor API online help for many of the objects involved.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=GUID-AssetLibraries" target="_blank" rel="noopener"&gt;AssetLibraries&lt;/A&gt;&amp;nbsp;(a collection of individual AssetLibrary objects)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=GUID-AssetLibrary" target="_blank" rel="noopener"&gt;AssetLibrary&lt;/A&gt;&amp;nbsp;(a single AssetLibrary object, potentially containing specs for multiple Asset objects)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=GUID-Assets" target="_blank" rel="noopener"&gt;Assets&lt;/A&gt;&amp;nbsp;(the 'local' collection of assets stored in an Inventor model Document)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=GUID-Asset" target="_blank" rel="noopener"&gt;Asset&lt;/A&gt;&amp;nbsp;(can be the specs for a single material, a single appearance, or a single physical properties)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=GUID-MaterialAsset" target="_blank" rel="noopener"&gt;MaterialAsset&lt;/A&gt;&amp;nbsp; (a sub-type of the regular Asset type, specifically for a material, and has associations with a single appearance asset and a single physical property asset)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=GUID-AssetValue" target="_blank" rel="noopener"&gt;AssetValue&lt;/A&gt;&amp;nbsp;(a base type for a bunch of more specific sub-types, each designed for storing a specific type of value...Each Asset has multiple AssetValues as its Items)&lt;/P&gt;
&lt;P&gt;Here are some more...&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=Application_AssetLibraries" target="_blank" rel="noopener"&gt;Application.AssetLibraries&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=Application_ActiveAppearanceLibrary" target="_blank" rel="noopener"&gt;Application.ActiveAppearanceLibrary&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=Application_ActiveMaterialLibrary" target="_blank" rel="noopener"&gt;Application.ActiveMaterialLibrary&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=PartDocument_ActiveAppearance" target="_blank" rel="noopener"&gt;PartDocument.ActiveAppearance&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=PartDocument_ActiveMaterial" target="_blank" rel="noopener"&gt;PartDocument.ActiveMaterial&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2026/ENU/?guid=PartDocument_Assets" target="_blank" rel="noopener"&gt;PartDocument.Assets&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2025 16:24:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/cannot-access-fundamental-api-objects-e-g-materialmanager/m-p/13654422#M29</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2025-05-28T16:24:14Z</dc:date>
    </item>
  </channel>
</rss>

