Capturing errors outside of access

G

Glen

I have created a VBA application written for an access database. This
application checks if there is an open application of AutoCAD, opens
ACAD if necessary, opens selected drawings, and pulls pertinent
information from those drawings into the access database. I have
recently discovered a problem with my application where it will freeze.

This condition occurs if the ACAD drawing was written with ACAD 2005
and the user of my application has ACAD 2002. ACAD 2002 is not capable

of opening these files due to incompatibilities. Is there an error
handling procedure that I can use that will capture the error from
ACAD, report the error to Access, and continue checking the other
drawings? It doesn't need to be pretty. I just need to find a way to
keep this from locking the application up. Thanks for any help.
 
L

Larry Daugherty

It should be doable but you'd have to research it all the way through.
You'd need to be able to analyze the Autocad.exe to determine it's
generation. Then you'd need to maintain, in a table or a function,
the matrix of which generation EXE handles which target files. The
Autocad people or newsgroups may be able to help you with some or all
of that.

The long and short of it is that it isn't an Access issue. The
problem lies elsewhere, only the solutions will go into Access.

HTH
 
G

Glen

Thanks Douglas and Larry.
Yes I am using automation to invoke AutoCAD. I then have it open and
close a series of drawings that are selected by the user while AutoCAD
is running. Can I still trap the errors even though the ACAD
application is opening and closing files and the error might occur in
the middle? I will also take your suggestion and ask the AutoDesk
forum for help with this. Again, thank you for your responses.
 
G

Glen

Just to let you know, I worked it out this afternoon. Sometimes I seem
to make things harder than than really are. I found that in my code
when each drawing is opened, the ACAD application is empty if the
drawing file is an incompatible version. I placed an error handling
routine to recognize this and skip other modules that were dependent on
the drawing data. It seems to work correctly with a variety of drawing
versions. Thanks again for your suggestions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top