<?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: Change active Project file via .net in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-active-project-file-via-net/m-p/7383203#M97978</link>
    <description>&lt;P&gt;hi&amp;nbsp;@Anonymous&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try the below code &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;InvApp = System.Runtime.InteropServices.Marshal.GetActiveObject("Inventor.Application")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;InvApp.DesignProjectManager.DesignProjects.Add(MultiUserModeEnum.kSingleUserMode, "&lt;SPAN&gt;Default.ipj&lt;/SPAN&gt;","&lt;SPAN&gt;C:\Users\Public\Documents\Autodesk\Inventor 2017\Projects&lt;/SPAN&gt;").Activate()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;InvApp.DesignProjectManager.DesignProjects.Add(MultiUserModeEnum.kSingleUserMode, "Project_A.ipj","C:\Autodesk").Activate()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Between is there any specific reason is there to activate&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;"Default.ipj"&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;before activating&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;"Project_A"&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Sep 2017 12:01:53 GMT</pubDate>
    <dc:creator>b_sharanraj</dc:creator>
    <dc:date>2017-09-15T12:01:53Z</dc:date>
    <item>
      <title>Change active Project file via .net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-active-project-file-via-net/m-p/7382988#M97977</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the following situation. If we open a file from Vault, from time to time, we got this message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Value cannot be null. Parameter name: path 1"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's a problem you can solve, by uninstall the complete Autodesk package and install it again (says a thread at Autodesk). The Problem is, the problem comes again after a specific time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was searching for a solution much simpler and faster than uninstalling everything and installing it again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you change the Project file from the specific one, we're using to default, and back to the one, we're using, everything is fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, my idea was to set the project file to default and back to the specific one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's call it Project_A.ipj&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The manual procedure is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;Start Inventor&lt;/P&gt;&lt;P&gt;2. Open the projects manager&lt;/P&gt;&lt;P&gt;3. Switch the project file to "Default"&lt;/P&gt;&lt;P&gt;4. Click on "Done"&lt;/P&gt;&lt;P&gt;5. Again open the projects manager&lt;/P&gt;&lt;P&gt;6. Change the Projectfile to "Project_A.ipj"&lt;/P&gt;&lt;P&gt;7. Click on "Done"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I change the project file via .net (here vb)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inventor1.FileLocations.FileLocationFile = "C:\Users\Public\Documents\Autodesk\Inventor 2017\Projects\Default.ipj"&lt;/P&gt;&lt;P&gt;Inventor1.FileLocations.FileLocationFile = "C:\Autodesk\Project_A.ipj"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This doesn't have the same effect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is, the manual way, especially 4. "Done" is doing something inside Inventor and it is not automatically triggered by the "FileLocationFile" procedure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any idea, how to produce the same effect the "manual way" did in vb.net?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Passi&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 10:21:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-active-project-file-via-net/m-p/7382988#M97977</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-15T10:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Change active Project file via .net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/change-active-project-file-via-net/m-p/7383203#M97978</link>
      <description>&lt;P&gt;hi&amp;nbsp;@Anonymous&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try the below code &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;InvApp = System.Runtime.InteropServices.Marshal.GetActiveObject("Inventor.Application")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;InvApp.DesignProjectManager.DesignProjects.Add(MultiUserModeEnum.kSingleUserMode, "&lt;SPAN&gt;Default.ipj&lt;/SPAN&gt;","&lt;SPAN&gt;C:\Users\Public\Documents\Autodesk\Inventor 2017\Projects&lt;/SPAN&gt;").Activate()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;InvApp.DesignProjectManager.DesignProjects.Add(MultiUserModeEnum.kSingleUserMode, "Project_A.ipj","C:\Autodesk").Activate()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Between is there any specific reason is there to activate&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;"Default.ipj"&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;before activating&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;"Project_A"&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 12:01:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/change-active-project-file-via-net/m-p/7383203#M97978</guid>
      <dc:creator>b_sharanraj</dc:creator>
      <dc:date>2017-09-15T12:01:53Z</dc:date>
    </item>
  </channel>
</rss>

