<?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: Inventor 2012 getobject(, inventor.application) in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3072814#M140252</link>
    <description>&lt;P&gt;Windows 7 Professional x86&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The UAC settings are still set at the default levels.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both builds are localized.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The exception does occur on the "GetActiveObject" line.&lt;/P&gt;&lt;P&gt;r&lt;/P&gt;&lt;P&gt;The exception Monty was discribing is the same issue, just throwing a different exception because that was received using different code. We first started testing this on our own code, in which we use the "GetObject" command. When we couldn't get around the "Cannot create ActiveX control" error we were getting from "GetObject" I switched to the sample code that came in the SDK package for Inventor 2011. That is where the above code came from. I originally thought the problem might be from the fact that I had installed Inventor 2012 on my machine while still having 2011 installed. I have since done a complete uninstall of all Autodesk products following the steps outlined &lt;A target="_self" href="http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&amp;amp;id=2887771&amp;amp;linkID=9240697"&gt;here&lt;/A&gt;. I will do another clean uninstall and reinstall and test the code with the UAC settings turned off.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jun 2011 12:17:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-06-27T12:17:19Z</dc:date>
    <item>
      <title>Inventor 2012 getobject(, inventor.application)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3066624#M140245</link>
      <description>&lt;P&gt;Having issues with the&amp;nbsp;getobject(, "inventor.application") and&amp;nbsp;the&amp;nbsp;createobject( "inventor.application") with Inventoe 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;giving me Error "can't create AxtiveX Object"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;running from external windows form application&amp;nbsp; VB.net 2010&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2011 16:32:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3066624#M140245</guid>
      <dc:creator>montylowe</dc:creator>
      <dc:date>2011-06-21T16:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: Inventor 2012 getobject(, inventor.application)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3070714#M140246</link>
      <description>&lt;P&gt;Can you try to launch Inventor once then check the code again?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also please post some code around the error if you still see the failure.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2011 09:20:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3070714#M140246</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2011-06-24T09:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Inventor 2012 getobject(, inventor.application)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3071250#M140247</link>
      <description>&lt;P&gt;It works fine on an XP loaded machine but will not work on Windows 7.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2011 15:06:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3071250#M140247</guid>
      <dc:creator>montylowe</dc:creator>
      <dc:date>2011-06-24T15:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Inventor 2012 getobject(, inventor.application)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3071566#M140249</link>
      <description>&lt;P&gt;‘ Try to get an active instance of Inventor&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_inventorApp = System.Runtime.InteropServices.Marshal.GetActiveObject("Inventor.Application")&lt;/P&gt;&lt;P&gt;Catch ex As Exception&lt;/P&gt;&lt;P&gt;End Try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;' If not active, create a new Inventor session&lt;/P&gt;&lt;P&gt;If m_inventorApp Is Nothing Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim inventorAppType As Type = System.Type.GetTypeFromProgID("Inventor.Application")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_inventorApp = System.Activator.CreateInstance(inventorAppType)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_quitInventor = True&amp;nbsp;&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pretty strait forward code. The error that gets thrown is an "Invalid String Exception". I've been able to compile the code and run it on a Windows XP machine, however I am unable to get the code to work on a Windows 7 machine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Incase you're wondering, I work with Monty.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2011 18:40:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3071566#M140249</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-24T18:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Inventor 2012 getobject(, inventor.application)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3072296#M140250</link>
      <description>&lt;P&gt;I have the exact same problem with only one Windows 7 machine, I have about 6 other Win 7 machines that it works on just fine. the only thing that I can figure is that the one I cant get it to work on is a home edition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jun 2011 02:42:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3072296#M140250</guid>
      <dc:creator>Mike.Wohletz</dc:creator>
      <dc:date>2011-06-26T02:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Inventor 2012 getobject(, inventor.application)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3072582#M140251</link>
      <description>&lt;P&gt;May I have more info from you about your OS details(edition, x64 or x86?)?&amp;nbsp;Are you the administrator of the OS,&amp;nbsp;and have your&amp;nbsp;the UAC(user&amp;nbsp;access control) on?&amp;nbsp;Is your Inventor/OS a localized build? And on which line you got the exception(GetActiveObject)? Seems that you have a different exception from Monty's.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2011 03:07:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3072582#M140251</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2011-06-27T03:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Inventor 2012 getobject(, inventor.application)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3072814#M140252</link>
      <description>&lt;P&gt;Windows 7 Professional x86&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The UAC settings are still set at the default levels.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both builds are localized.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The exception does occur on the "GetActiveObject" line.&lt;/P&gt;&lt;P&gt;r&lt;/P&gt;&lt;P&gt;The exception Monty was discribing is the same issue, just throwing a different exception because that was received using different code. We first started testing this on our own code, in which we use the "GetObject" command. When we couldn't get around the "Cannot create ActiveX control" error we were getting from "GetObject" I switched to the sample code that came in the SDK package for Inventor 2011. That is where the above code came from. I originally thought the problem might be from the fact that I had installed Inventor 2012 on my machine while still having 2011 installed. I have since done a complete uninstall of all Autodesk products following the steps outlined &lt;A target="_self" href="http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&amp;amp;id=2887771&amp;amp;linkID=9240697"&gt;here&lt;/A&gt;. I will do another clean uninstall and reinstall and test the code with the UAC settings turned off.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2011 12:17:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3072814#M140252</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-27T12:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Inventor 2012 getobject(, inventor.application)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3074038#M140253</link>
      <description>&lt;P&gt;Update:&lt;/P&gt;&lt;P&gt;Disabling the UAC for my computer now allows the "GetActiveObject" line to function as it's supposed to. Also the code now executes the "CreateInstance" line as it's supposed to. Thank you guys for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Recap:&lt;/P&gt;&lt;P&gt;Disabling the UAC settings on my computer fixed this problem. You can access these settings through the Control Panel &amp;gt; User Accounts &amp;gt; Change User Account Control settings.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2011 12:23:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/3074038#M140253</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-28T12:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Inventor 2012 getobject(, inventor.application)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/9974534#M140254</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This is very old discussion, but I thought I would add my solution also in case someone else happens to google this same thread in hope of an answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using Visual Studio and doing something similar. I had the same issue with the getobject not working with "inventor.application" parameter. The way I fixed this was by switching the .net environment to different version. I was using 5.0 and I got the error with that, but soon as I started a new project and used .net 4.0 the getobject worked just fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure if you'd be able to get it working by just adding some missing references, but in this way it at least works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;-JuhaP&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jan 2021 10:40:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/inventor-2012-getobject-inventor-application/m-p/9974534#M140254</guid>
      <dc:creator>juha.perala</dc:creator>
      <dc:date>2021-01-03T10:40:42Z</dc:date>
    </item>
  </channel>
</rss>

