error handling when plotting in acad vba
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
error handling when plotting in acad vba

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
sien
Guest





Posted: Mon Apr 18, 2005 4:10 pm    Post subject: error handling when plotting in acad vba Reply with quote

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.

Back to top
Guest






Posted: Tue May 10, 2005 4:10 pm    Post subject: Re: error handling when plotting in acad vba Reply with quote

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
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB