<?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: &amp;quot;Active Document is Not a Part Document&amp;quot; Issue in Autodesk Inventor in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/quot-active-document-is-not-a-part-document-quot-issue-in/m-p/13207020#M174738</link>
    <description>&lt;P&gt;I &amp;nbsp;do not know python but i do not really understand if you did it correctly here :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;part_doc = inventor_app.Documents.Open(part_file_path) inventor_app.ActiveDocument =part_doc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;active document is read only:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="marcin_otrba_0-1733992565424.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1444915iDD7AB0211F8A030E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="marcin_otrba_0-1733992565424.png" alt="marcin_otrba_0-1733992565424.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;maybe it should be :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;part_doc = inventor_app.Documents.Open(part_file_path)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Dec 2024 08:36:55 GMT</pubDate>
    <dc:creator>marcin_otręba</dc:creator>
    <dc:date>2024-12-12T08:36:55Z</dc:date>
    <item>
      <title>"Active Document is Not a Part Document" Issue in Autodesk Inventor</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/quot-active-document-is-not-a-part-document-quot-issue-in/m-p/13205256#M174703</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this message finds you well. I am writing to seek assistance regarding an issue I’ve encountered while trying to programmatically interact with Autodesk Inventor via Python scripts using the Inventor API.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem Description&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;While attempting to process a Part Document (.ipt) using the API, the script consistently returns the following error:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;"Active document is not a Part Document. Please open a Part (.ipt) file."&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;What I Have Tried&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Verified that the correct file (Part.ipt) is located in the target directory.&lt;/LI&gt;&lt;LI&gt;Manually opened the Part Document in Autodesk Inventor before running the script.&lt;/LI&gt;&lt;LI&gt;Attempted to explicitly activate the Part Document in the script using:&lt;DIV class=""&gt;&lt;DIV class=""&gt;python&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Copy code&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;part_doc = inventor_app.Documents.Open(part_file_path) inventor_app.ActiveDocument = part_doc&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;Confirmed the document type with:&lt;DIV class=""&gt;&lt;DIV class=""&gt;python&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Copy code&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;part_doc.DocumentType&lt;/DIV&gt;&lt;/DIV&gt;The result is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;12290, which doesn’t match the expected value for a Part Document (2).&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;Environment Details&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Autodesk Inventor Version:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;2025&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Python Version:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;3.13.1&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Operating System:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Windows 11 Pro&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;API/Library:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;PyWin32 for COM interaction&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Expected Behavior&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The script should identify the active document as a Part Document and proceed with further processing without errors.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Request for Assistance&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Could you please advise on:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Whether the document type&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;12290&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;indicates a specific issue or misconfiguration?&lt;/LI&gt;&lt;LI&gt;Steps to ensure the Part Document is correctly recognized by the API.&lt;/LI&gt;&lt;LI&gt;Any additional settings or adjustments required in Autodesk Inventor for seamless API interaction.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;If necessary, I can provide sample code or additional details about the environment and workflow.&lt;/P&gt;&lt;P&gt;Thank you for your time and support. I look forward to your guidance on resolving this issue.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Best Regards,&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 13:11:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/quot-active-document-is-not-a-part-document-quot-issue-in/m-p/13205256#M174703</guid>
      <dc:creator>svloFNWW9</dc:creator>
      <dc:date>2024-12-11T13:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: "Active Document is Not a Part Document" Issue in Autodesk Inventor</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/quot-active-document-is-not-a-part-document-quot-issue-in/m-p/13205565#M174709</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11732889"&gt;@svloFNWW9&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would have thought it unnecessary to set the active document = to itself as this might have unintended outcome.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the number this is the enum value for the part document which checks out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;kPartDocumentObject&lt;/TD&gt;&lt;TD&gt;12290&lt;/TD&gt;&lt;TD&gt;Part Document&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should be able to use from this point on&amp;nbsp;&lt;/P&gt;&lt;P&gt;The set variable&amp;nbsp;&lt;SPAN&gt;part_doc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 15:23:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/quot-active-document-is-not-a-part-document-quot-issue-in/m-p/13205565#M174709</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2024-12-11T15:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: "Active Document is Not a Part Document" Issue in Autodesk Inventor</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/quot-active-document-is-not-a-part-document-quot-issue-in/m-p/13207020#M174738</link>
      <description>&lt;P&gt;I &amp;nbsp;do not know python but i do not really understand if you did it correctly here :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;part_doc = inventor_app.Documents.Open(part_file_path) inventor_app.ActiveDocument =part_doc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;active document is read only:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="marcin_otrba_0-1733992565424.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1444915iDD7AB0211F8A030E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="marcin_otrba_0-1733992565424.png" alt="marcin_otrba_0-1733992565424.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;maybe it should be :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;part_doc = inventor_app.Documents.Open(part_file_path)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 08:36:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/quot-active-document-is-not-a-part-document-quot-issue-in/m-p/13207020#M174738</guid>
      <dc:creator>marcin_otręba</dc:creator>
      <dc:date>2024-12-12T08:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: "Active Document is Not a Part Document" Issue in Autodesk Inventor</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/quot-active-document-is-not-a-part-document-quot-issue-in/m-p/13245859#M175224</link>
      <description>&lt;P&gt;The "Active Document" is the file that is currently selected and opened in Inventor. If that file is not a part document, you will get this error.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 18:25:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/quot-active-document-is-not-a-part-document-quot-issue-in/m-p/13245859#M175224</guid>
      <dc:creator>C_Haines_ENG</dc:creator>
      <dc:date>2025-01-06T18:25:23Z</dc:date>
    </item>
  </channel>
</rss>

