<?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 Inv2022 - Replace model reference via API in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/inv2022-replace-model-reference-via-api/m-p/10428525#M125949</link>
    <description>&lt;P&gt;The Replace Model Reference drawing command has been updated to manage the model states, it gives the ability to replace the referenced document in its model state (model state member document).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CattabianiI_0-1624957638260.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/935556i1FBD40EC491F3D08/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CattabianiI_0-1624957638260.png" alt="CattabianiI_0-1624957638260.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In previous Inventor versions I implemented this functionality with &lt;A href="https://help.autodesk.com/view/INVNTOR/2021/ENU/?guid=GUID-1D1D47E8-3866-4C7D-B207-FB60521EA917" target="_blank" rel="noopener"&gt;FileDescriptor.ReplaceReference&lt;/A&gt; but now I need to work at a document level not file level to implement the Replace Model Reference behaviour via API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way the lack of API is something already came up in certain pattern like &lt;A href="https://forums.autodesk.com/t5/inventor-customization/replace-reference-file-for-a-specific-drawing-view/td-p/7190241" target="_blank" rel="noopener"&gt;this one&lt;/A&gt;:&amp;nbsp;&lt;BR /&gt;Now with model states is even more necessary.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Is there something I am missing and it's already doable? Could you please add an api otherwise?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Jun 2021 09:07:29 GMT</pubDate>
    <dc:creator>CattabianiI</dc:creator>
    <dc:date>2021-06-29T09:07:29Z</dc:date>
    <item>
      <title>Inv2022 - Replace model reference via API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/inv2022-replace-model-reference-via-api/m-p/10428525#M125949</link>
      <description>&lt;P&gt;The Replace Model Reference drawing command has been updated to manage the model states, it gives the ability to replace the referenced document in its model state (model state member document).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CattabianiI_0-1624957638260.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/935556i1FBD40EC491F3D08/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CattabianiI_0-1624957638260.png" alt="CattabianiI_0-1624957638260.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In previous Inventor versions I implemented this functionality with &lt;A href="https://help.autodesk.com/view/INVNTOR/2021/ENU/?guid=GUID-1D1D47E8-3866-4C7D-B207-FB60521EA917" target="_blank" rel="noopener"&gt;FileDescriptor.ReplaceReference&lt;/A&gt; but now I need to work at a document level not file level to implement the Replace Model Reference behaviour via API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way the lack of API is something already came up in certain pattern like &lt;A href="https://forums.autodesk.com/t5/inventor-customization/replace-reference-file-for-a-specific-drawing-view/td-p/7190241" target="_blank" rel="noopener"&gt;this one&lt;/A&gt;:&amp;nbsp;&lt;BR /&gt;Now with model states is even more necessary.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Is there something I am missing and it's already doable? Could you please add an api otherwise?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 09:07:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/inv2022-replace-model-reference-via-api/m-p/10428525#M125949</guid>
      <dc:creator>CattabianiI</dc:creator>
      <dc:date>2021-06-29T09:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Inv2022 - Replace model reference via API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/inv2022-replace-model-reference-via-api/m-p/10503324#M126981</link>
      <description>&lt;P&gt;Does this not work anymore:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Dim oPartDoc As Document 'PartDocument
            oPartDoc = ThisApplication.ActiveDocument

            Dim oRefPartDoc As DocumentDescriptor

 
            oRefPartDoc = oPartDoc.ReferencedDocumentDescriptors.Item("")

            oRefPartDoc.ReferencedFileDescriptor.ReplaceReference("")
            oPartDoc.Update()&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 28 Jul 2021 19:08:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/inv2022-replace-model-reference-via-api/m-p/10503324#M126981</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2021-07-28T19:08:12Z</dc:date>
    </item>
  </channel>
</rss>

