[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

An unhandled exception of type 'System.Runtime.InteropServices.COMException'

Posted on 2006-03-21
11
Medium Priority
?
1,743 Views
Last Modified: 2012-08-14
I am trying to get some block info from an Autocad drawing using vb.net.
It was working fine with autocad 2005.When we upgraded to autocad 2006, it is crashing.
The first one is having problem is in the line
Dim CurrentSpace As String
CurrentSpace = AppObj.ActiveDocument.ActiveLayout.Block.Name '  
          This is returning >> "*Paper_Space"

For I = 0 To AppObj.ActiveDocument.Blocks.Count – 1    ‘ERROR IS HERE ’
Where Friend WithEvents AppObj As Autodesk.AutoCAD.Interop.AcadApplication
The error is
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in DrawingIndexer.exe

Additional information: No database

If I look in the quick watch window for AppObj.ActiveDocument.Blocks this is the error
Blocks      <error: an exception of type: {System.Runtime.InteropServices.COMException} occurred>
Type:      Autodesk.AutoCAD.Interop.Common.AcadBlocks
0
Comment
Question by:aio419
  • 5
  • 4
10 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16249949
Did you readd the reference to the Autocad, or are you using the same wrapper class?

Bob
0
 

Author Comment

by:aio419
ID: 16250178
Yes,I readded the references. (named Autocad 2006 Type Library and AxdbLib.(16.0) type library)
from the COM tab

0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16250247
Ok, so the developers have changed the interface for the type library, and you need to figure out how.  I don't know what that would be exactly.

Bob
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:aio419
ID: 16250497
Thanks for the reply.
I trying to find out why it is not working for acad 2006  with
AppObj.ActiveDocument.Blocks.Count  giving no database error.

Do i need to add any other references or is there any change for Acad 2006 for this.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16250517
The type libraries for 2006 have been renamed, so did you add a reference to the new name?  Do you still have 2005 installed?

Bob
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16250534
The Autocad 2006 CD has documentation and samples that might help explain your problems.

Bob
0
 

Author Comment

by:aio419
ID: 16250801
i do not have 2005 installed. I removed the reference for 2005 and added 2006 references.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16261996
I am out of ideas.

Bob
0
 

Author Comment

by:aio419
ID: 16284084
After a struggle I figured out that it is a bug in Autocad and got a hot fix them to patch it.
It is working now.
Thanks for your replay though.
0
 

Accepted Solution

by:
GranMod earned 0 total points
ID: 16325747
Closed, 35 points refunded.
GranMod
The Experts Exchange
Community Support Moderator of all Ages
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question