capturing errors

Discussion in 'AutoCAD' started by glen.welsh, Apr 19, 2006.

  1. glen.welsh

    glen.welsh Guest

    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.
     
    glen.welsh, Apr 19, 2006
    #1
  2. glen.welsh

    glen.welsh Guest

    Thanks for getting back to me CADmechanic. I don't know what the error
    number is anymore. I figured out a work around for it. Basically what
    was happening was that I have some users with CAD 2002 and some with
    2005. If it is a 2005 version the file can't be opened with 2002 and
    the program that i had written was stopping on the error and not
    chacking anymore drawings for attribute block material lists. I placed
    an error handling routine immediately after the "open drawing"
    procedure and handle it from there. It is not as clean as I would like
    it to be because it handles every error in that procedure as if it is a
    compatibility issue even if there is something larger going on. It
    works and I guess I shouldn't complain at this point but I would still
    like to handle this seperately in the routine. I just don't want to
    have to change a ton of code to accomplish it.
     
    glen.welsh, Apr 24, 2006
    #2
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 (here). After that, you can post your question and our members will help you out.