.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Working with AutoCAD 64 bits

8 REPLIES 8
Reply
Message 1 of 9
Anonymous
4156 Views, 8 Replies

Working with AutoCAD 64 bits

Hi My 32 bits .net application works on 32 bits machines but is crashes on 64 bits ones with the following error



System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Autodesk.AutoCAD.Interop.AcadApplication'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{8F17437C-2EFB-4FC4-8188-EEFA50FE7147}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)




It looks like it stops when trying to execute the following statement

Dim AcadApp As Autodesk.AutoCAD.Interop.AcadApplication = CType(Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication, Autodesk.AutoCAD.Interop.AcadApplication)







Any help I will appreciate Raul
8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: Anonymous

rtejada@pancanal.com wrote:

> Hi My 32 bits .net application works on 32 bits machines but is
> crashes on 64 bits ones with the following error
>
> System.Reflection.TargetInvocationException: Exception has been
> thrown by the target of an invocation. --->
> System.InvalidCastException: Unable to cast COM object of type
> 'System.__ComObject' to interface type
> 'Autodesk.AutoCAD.Interop.AcadApplication'.

First keep in mind I'm no expert, but I tried this also. When your
assembly is built with an early bind to a 32bit AutoCAD COM it won't
run in 64bit. I 'suppose' you could change the COM link to a 64bit
AutoCAD COM and prepare a separate 64bit build.

In my opinion your better off porting all your COM/ActiveX code to pure
.NET and use the AnyCPU compile option. Then use 'late bound' COM only
for the rare instance that it cannot be done in .NET.

My ports are 99.9% pure .NET as of right now and a single build loads
and runs fine in AutoCAD 2007 or higher, 32 or 64bit.

Good Luck, Terry
Message 3 of 9
Anonymous
in reply to: Anonymous

Hi Terry,
Thanks for your answer, eventually I will find the way to go pure .Net (no COM involved) in the meantime, do you know the best way to get the current runtime AutoCAD application object without using com interop?.

Thanks

Raul
Message 4 of 9
Anonymous
in reply to: Anonymous

Hi Terry,
Thanks for your answer, eventually I will find the way to go pure .Net (no COM involved) in the meantime, do you know the best way to get the current runtime AutoCAD application object without using com interop?.

Thanks

Raul
Message 5 of 9
Anonymous
in reply to: Anonymous

Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication

You can use late binding to invoke methods on the AcadApplication without having to reference the COM type libraries.

for example:

object oApp = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;

// Call the Quit() method of the AcadApplication object:

oApp.GetType().InvokeMember("QUIT", BindingFlags.InvokeMethod, null, oApp, null);


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

wrote in message news:6043527@discussion.autodesk.com...
Hi Terry,
Thanks for your answer, eventually I will find the way to go pure .Net (no COM involved) in the meantime, do you know the best way to get the current runtime AutoCAD application object without using com interop?.

Thanks

Raul
Message 6 of 9
Anonymous
in reply to: Anonymous

Thanks Tony for the late binding example. It will do it.
Message 7 of 9
Anonymous
in reply to: Anonymous

I get the same message as below and as the attached file. Several users here have the same problem. We are using hp Z600 Xenon Quad core with 6GB ram & .5Terra Hdd's & 750 MB Nvidea FX1800 Video cards on Windows XP x64 Operating System

I was told by a reseller that this function has been disabled in Civil 3D and wanted £800 to try & fix it. (.NET software have all been deleted and reloaded from Microsoft website)

This operation failed because the QueryInterface call on the COM component for the interface with IID '{8F17437C-2EFB-4FC4-8188-EEFA50FE7147}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)

This error is reportwed when in the CUI interface and trying to drag & drop other icons into other icon groups. I do not use Ribbon as I do not like it and neither do most of the other users in this company. Classic sytle is best for our use.

I manage 500 cad users here with over £500,000 outlay to Autodesk. I would like a free fix please. I can do anything in Civil 3D 2009 without error messages.

Come on Autodesk what is the problem? Or is it just a way for resellers to make some extra cash?
Message 8 of 9
Anonymous
in reply to: Anonymous

Whatever reseller told you that is trying to rob you.

This is a bug, plain and simple, and any reseller that tries to sell
you a 'fix' for a bug should be reported to Autodesk.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6321611@discussion.autodesk.com...
I get the same message as below and as the attached file. Several users here
have the same problem. We are using hp Z600 Xenon Quad core with 6GB ram &
.5Terra Hdd's & 750 MB Nvidea FX1800 Video cards on Windows XP x64 Operating
System

I was told by a reseller that this function has been disabled in Civil 3D and
wanted £800 to try & fix it. (.NET software have all been deleted and reloaded
from Microsoft website)

This operation failed because the QueryInterface call on the COM component for
the interface with IID '{8F17437C-2EFB-4FC4-8188-EEFA50FE7147}' failed due to
the following error: No such interface supported (Exception from HRESULT:
0x80004002 (E_NOINTERFACE)

This error is reportwed when in the CUI interface and trying to drag & drop
other icons into other icon groups. I do not use Ribbon as I do not like it and
neither do most of the other users in this company. Classic sytle is best for
our use.

I manage 500 cad users here with over £500,000 outlay to Autodesk. I would like
a free fix please. I can do anything in Civil 3D 2009 without error messages.

Come on Autodesk what is the problem? Or is it just a way for resellers to make
some extra cash?
Message 9 of 9
Anonymous
in reply to: Anonymous

Hello, I'm having the same issue when I try to drag and drop a command from the command list into the shortcut keys palette. I'm using AutoCAD 2008 64bit. Any help would be appreciated.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost