I am with mbennum on this one, and am having this exact issue. I think it has something to do with installing Civil 3D 2010 on a Windows 7 machine before installing Plant 3D 2010 (or any 64-bit version of AutoCAD product).We have installed P3D on 3 Windows 7 boxes and 2 out of the 3 will produce this exact error. The other machine works as expected. After some inspection, I have determined that the one that works had ACA 2010 (64-bit program) installed, then C3D 2010 (32-bit), then P3D 2010 in that sequence. The other 2 had Civil 3D installed before any 64-bit products installed.
Re-installing products (in the "correct"order) will not resolve this issue, but this method worked for me. You will need to goto your deployment install directory for a 64-bit AutoCAD product (..\AdminImage\x64\acad\Program Files\Root\GAC344) and copy the Autodesk.AutoCAD.Interop.dll file that is in there to the GAC on your local computer. (C:\Windows\Assembly\gac_msil\Autodesk.AutoCAD.Interop\18.0.0.0__eed84259d7cbf30b) and replace the Autodesk.AutoCAD.Interop.dll file in there with the one from your deploy folder. I couldn't tell by any means any difference in the 2 files by looking at their properties (same file size, version), but this did the trick for me.
Take a look at the error:
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 '{84F323FC-C179-4704-87E7-E3D576C2599E}' failed due to the following error:
No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
If you do a search in your registry for the GUID {84F323FC-C179-4704-87E7-E3D576C2599E}, you will find that it references a Type Library that (do some more digging and you will find) is pathed to @="C:\\Program Files (x86)\\Common Files\\Autodesk Shared\\acax18enu.tlb". And as you can see from the location of that AutoCAD 2010 Type Library it is a 32-bit version and hence the "QueryInterface" error. I originally tried to edit registry to correct this error with no luck.
I will be watching Civil 3D 2010 for possible errors now due to the "hack" that I have done, and in the mean time, maybe someone who knows more than I can get to the "real" reason for this error.
Thanks, and hope this works for you.
Edited by: RickPatterson on Mar 30, 2010 4:07 AM