<?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: Updating part file parameters with Python in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11401609#M33310</link>
    <description>&lt;P&gt;you can try:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;oDoc.Update()
oDoc.Update2()&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 05 Sep 2022 13:06:03 GMT</pubDate>
    <dc:creator>JelteDeJong</dc:creator>
    <dc:date>2022-09-05T13:06:03Z</dc:date>
    <item>
      <title>Updating part file parameters with Python</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11399242#M33307</link>
      <description>&lt;P&gt;Dear forum users,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to use Python to update certain parameters within a part file in Inventor? I've searched the forum, and the closest I could come to a solution is a post about adding missing parameters, which is not what I want to do.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be extremely helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Sep 2022 14:34:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11399242#M33307</guid>
      <dc:creator>20854706</dc:creator>
      <dc:date>2022-09-03T14:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Updating part file parameters with Python</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11399347#M33308</link>
      <description>&lt;P&gt;this rule will update a parameter&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;import win32com.client
from win32com.client import gencache, Dispatch, constants, DispatchEx

ThisApplication = win32com.client.Dispatch('Inventor.Application')
ThisApplication.Visible = True
CastTo = gencache.EnsureModule('{D98A091D-3A0F-4C3E-B36E-61F62068D488}', 0, 1, 0)
ThisApplication = CastTo.Application(ThisApplication)

oDoc = ThisApplication.ActiveDocument
oDoc = CastTo.PartDocument(oDoc)

params = oDoc.ComponentDefinition.Parameters

parameter1 = params.Item("MyParameterName")
print("number of Parameters: ",parameter1.Value)

parameter1.Value = 2.0
print("number of Parameters: ",parameter1.Value)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Sep 2022 16:16:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11399347#M33308</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2022-09-03T16:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Updating part file parameters with Python</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11401480#M33309</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt;&amp;nbsp;Thank you for your reply. It works! Although, while the parameter updates, the part does not. Is there a way to force the update rather than manually clicking on the "Update" button on the Manage tab?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to update the whole part with the new values, then export it as a .stl file after all the updates have happened.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to make this all automatic?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 12:04:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11401480#M33309</guid>
      <dc:creator>20854706</dc:creator>
      <dc:date>2022-09-05T12:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Updating part file parameters with Python</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11401609#M33310</link>
      <description>&lt;P&gt;you can try:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;oDoc.Update()
oDoc.Update2()&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 05 Sep 2022 13:06:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11401609#M33310</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2022-09-05T13:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Updating part file parameters with Python</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11402106#M33311</link>
      <description>&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt; Thank you again for the quick reply. The first line worked!&lt;BR /&gt;The last thing that I'm struggling with is exporting the file after I made the updates to the parameters. Is there a possible way of doing this?</description>
      <pubDate>Mon, 05 Sep 2022 18:13:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11402106#M33311</guid>
      <dc:creator>20854706</dc:creator>
      <dc:date>2022-09-05T18:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Updating part file parameters with Python</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11402111#M33312</link>
      <description>&lt;P&gt;what do you mean by exporting? do you want to create dxf's or pdf's?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 18:21:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11402111#M33312</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2022-09-05T18:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Updating part file parameters with Python</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11402116#M33313</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt;, I want to export the part as a .stl file type.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 18:23:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11402116#M33313</guid>
      <dc:creator>20854706</dc:creator>
      <dc:date>2022-09-05T18:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: Updating part file parameters with Python</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11402138#M33314</link>
      <description>&lt;P&gt;try this:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;newFileName = "d:\\temp\\test.stl"
oDoc.SaveAs(newFileName, True)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 05 Sep 2022 18:40:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11402138#M33314</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2022-09-05T18:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Updating part file parameters with Python</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11402151#M33315</link>
      <description>Thank you very much! You've been a great help!</description>
      <pubDate>Mon, 05 Sep 2022 18:59:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/updating-part-file-parameters-with-python/m-p/11402151#M33315</guid>
      <dc:creator>20854706</dc:creator>
      <dc:date>2022-09-05T18:59:06Z</dc:date>
    </item>
  </channel>
</rss>

