<?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 Trying to access Revit COM from Console Application using C#.net in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/trying-to-access-revit-com-from-console-application-using-c-net/m-p/4783337#M77742</link>
    <description>&lt;P&gt;I'm writing a console application in C#.net and I was hoping to access the Revit API's by including them as references.&amp;nbsp; I can code OK (all the autocorrect works and finds the contents of the libraries), but when I run the code, it crashes saying I have a x86 or x64 issue.&amp;nbsp; I found other pages showing how to resolve this, but nothing seems to work for me (in either 32- or 64-bit configurations )&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But my question isn't really how to resolve that, but rather why am I getting this error?&amp;nbsp; I'm working with all 64-bit API's, so why is there any issue?&amp;nbsp; I would think that referencing a 64-bit Revit API on a 64-bit console application would be compatible.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, can I even access the Revit COM from a console application?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And, if I can access Revit, how can I get rid of this x64 x86 issue?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jan 2014 01:01:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-01-30T01:01:42Z</dc:date>
    <item>
      <title>Trying to access Revit COM from Console Application using C#.net</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/trying-to-access-revit-com-from-console-application-using-c-net/m-p/4783337#M77742</link>
      <description>&lt;P&gt;I'm writing a console application in C#.net and I was hoping to access the Revit API's by including them as references.&amp;nbsp; I can code OK (all the autocorrect works and finds the contents of the libraries), but when I run the code, it crashes saying I have a x86 or x64 issue.&amp;nbsp; I found other pages showing how to resolve this, but nothing seems to work for me (in either 32- or 64-bit configurations )&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But my question isn't really how to resolve that, but rather why am I getting this error?&amp;nbsp; I'm working with all 64-bit API's, so why is there any issue?&amp;nbsp; I would think that referencing a 64-bit Revit API on a 64-bit console application would be compatible.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, can I even access the Revit COM from a console application?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And, if I can access Revit, how can I get rid of this x64 x86 issue?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2014 01:01:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/trying-to-access-revit-com-from-console-application-using-c-net/m-p/4783337#M77742</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-30T01:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to access Revit COM from Console Application using C#.net</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/trying-to-access-revit-com-from-console-application-using-c-net/m-p/4783777#M77743</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please give more information on the actual issue? i.e., is there an error message or exception message?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revit does not have a COM API anymore so I am not sure how you are using the Revit API in an external application.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;More details about the what you are doing with the API would help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Gopinath&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2014 06:38:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/trying-to-access-revit-com-from-console-application-using-c-net/m-p/4783777#M77743</guid>
      <dc:creator>gopinath.taget</dc:creator>
      <dc:date>2014-01-30T06:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to access Revit COM from Console Application using C#.net</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/trying-to-access-revit-com-from-console-application-using-c-net/m-p/4783791#M77744</link>
      <description>Few questions come to mind: Have you tried copy local = false for both dlls? Are you running the correct .NET framework version ?</description>
      <pubDate>Thu, 30 Jan 2014 06:50:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/trying-to-access-revit-com-from-console-application-using-c-net/m-p/4783791#M77744</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-30T06:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to access Revit COM from Console Application using C#.net</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/trying-to-access-revit-com-from-console-application-using-c-net/m-p/4784693#M77745</link>
      <description>&lt;P&gt;I guess if there is no COM API, then that resolves the issue. Any reasons why they don't have COM access?&amp;nbsp; Seems like a terrible lack of functionality.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to confirm, something like this isn't possible:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            Autodesk.Revit.ApplicationServices.Application RevitApp;
            RevitApp = (Autodesk.Revit.ApplicationServices.Application)Marshal.GetActiveObject("REVIT.Application");&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using 4.0 .net.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2014 16:02:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/trying-to-access-revit-com-from-console-application-using-c-net/m-p/4784693#M77745</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-30T16:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to access Revit COM from Console Application using C#.net</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/trying-to-access-revit-com-from-console-application-using-c-net/m-p/4785091#M77746</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There was a COM based API for Revit many releases ago but we do not have one anymore. The supported API is a .NET API and it has to run in-process inside Revit. If you could&amp;nbsp;describe what you are trying to achive, I may be able to suggest some alternatives.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Gopinath&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2014 18:31:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/trying-to-access-revit-com-from-console-application-using-c-net/m-p/4785091#M77746</guid>
      <dc:creator>gopinath.taget</dc:creator>
      <dc:date>2014-01-30T18:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to access Revit COM from Console Application using C#.net</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/trying-to-access-revit-com-from-console-application-using-c-net/m-p/4785919#M77747</link>
      <description>&lt;P&gt;There isn't much to say, since if you say COM access is impossible, then I don't have any recourse.&amp;nbsp; I'm trying to create a C# console Application.&amp;nbsp; That won't work without COM access.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Strange, I can access CATIA and Rhino without issue.&amp;nbsp; This is a bummer that Revit isn't as useful in this sense.&amp;nbsp; I'd much rather code my stuff in a simple-to-use EXE, rather than have my clients try and install the crappy addin stuff into their session of Revit.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moving forward, I'll just have to recompile my code as a Revit plug-in, and access CATIA and Rhino via COM from Revit.&amp;nbsp; I assume &lt;EM&gt;that&lt;/EM&gt; is doable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2014 23:38:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/trying-to-access-revit-com-from-console-application-using-c-net/m-p/4785919#M77747</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-30T23:38:04Z</dc:date>
    </item>
  </channel>
</rss>

