Results 1 to 2 of 2

Thread: error handling when plotting in acad vba

  1. #1
    sien Guest

    error handling when plotting in acad vba

    Hello,

    I wrote a vba application that should create dwf files from dwg files.
    The interface has to run as a schedule task.
    The problem is that for some drawings we get a fatal error message and
    we have to click on OK button. Since that the routine is a task that
    run every night, I have to avoid this popup error.
    Is there a way to catch the error (eg. in vba with on error resume
    next) so that we can just neglect the drawing with error and go to the
    next drawing?
    Thanks a lot in advance.

  2. #2
    Guest
    When the error occurs is it the same error number?

    You could use something like this

    On Error Resume Next
    ' Code to open drawing
    Application.Documents.Open strFileName
    ' Test to see if drawing opens correctly
    If Err.Number=0 Then
    ' Process the drawing, etc .......


    End If

    Anthony Ryan

Similar Threads

  1. error plotting to Adobe Acrobat Pro 6
    By dspurling in forum Printing
    Replies: 0
    Last Post: 10-09-2010, 11:57 AM
  2. ACAD.LSP error
    By solarsnot in forum Customization
    Replies: 12
    Last Post: 03-26-2005, 05:36 AM
  3. ADT 2005 plotting error - HELP!
    By lmref in forum Printing
    Replies: 0
    Last Post: 01-31-2005, 01:38 PM
  4. Error Handling
    By HJohn in forum Customization
    Replies: 1
    Last Post: 01-21-2005, 02:11 PM
  5. ACAD 2005 how to disable error reporting
    By MjrWingnut in forum AutoCAD
    Replies: 1
    Last Post: 12-19-2004, 10:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other forums: Access Forum - Microsoft Office Forum - Exchange Server Forum