Trying to access Revit COM from Console Application using C#.net
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm writing a console application in C#.net and I was hoping to access the Revit API's by including them as references. 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. I found other pages showing how to resolve this, but nothing seems to work for me (in either 32- or 64-bit configurations )
But my question isn't really how to resolve that, but rather why am I getting this error? I'm working with all 64-bit API's, so why is there any issue? I would think that referencing a 64-bit Revit API on a 64-bit console application would be compatible.
So, can I even access the Revit COM from a console application?
And, if I can access Revit, how can I get rid of this x64 x86 issue?