musaranho Posted March 15, 2009 Share Posted March 15, 2009 I have the following code: 'GENERATING A SPECIFIC NAME FOR THE DRAWING AND SAVE IT xtNumPed = Format(txtNumPed, "00000#") sNP = Right(txtNumPed, 6) 'os seis últimos d�*gitos do nº do pedido dHr = Format(Hour(Now), "0#") 'hora dMn = Format(Minute(Now), "0#") 'minuto dSc = Format(Second(Now), "0#") 'segundo txtNDES = "RED" & "-" & sNP & "-" & dHr & dMn & "-" & dSc sNDes = txtNDES 'nº do desenho Dim SavePath As String Dim SaveName As String SavePath = "\\main\trabalho\autocad\automation\" SaveName = SavePath & sNDes & ".dwg" ThisDrawing.SaveAs SaveName, acNative 'THE CODE ABOVE GENERATES THIS MESSAGE: "Run-time error '-2145320861 (80210063)': Error saving the document" I'd like to receive information about this error. Thanks! Quote Link to comment Share on other sites More sharing options...
BrianWren Posted March 24, 2009 Share Posted March 24, 2009 I am having the exact same problem. Could you say which AutoCAD version you are using, and what the OS is? I'm using 2005, and Windows Server 2003. Quote Link to comment Share on other sites More sharing options...
musaranho Posted March 26, 2009 Author Share Posted March 26, 2009 AutoCad 2007 and XP SP3. Quote Link to comment Share on other sites More sharing options...
PatrickMoe Posted March 27, 2012 Share Posted March 27, 2012 (edited) Has this issue been resolved yet? I am having identical problems to what is being reported here and have found no help at all. I am automating AutoCAD 2012 via scripting from VB6. I am currently using AutoCAD 2012 on an up to date Windows XP machine that is running as a Virtual Machine. If I just run straight through, this code fails quite often. If I stop in the d e b u g g e r and slowly single step through the sub that the code is in, it will usually do what is needed. If it does fail while single stepping and I resume next and then set the line that does the SaveAs as the current line of execution and retry it, it works most of the time. This seems to be some kind of timing issue or something but for the life of me, I can't come up with an answer. I also get the following useless dialog box a lot when these issues come up. As you can plainly see, this error dialog is of absolutely no use at all. If any of you have come up with an answer or work-around for this, I would really appreciate a reply here or an email. Thank you in advance for any help on this issue. Pat Edited March 27, 2012 by PatrickMoe modify censored word Quote Link to comment Share on other sites More sharing options...
PatrickMoe Posted March 27, 2012 Share Posted March 27, 2012 :facepalm:I had to post one more to laugh at the fact that the word d e b u g g e r got censored. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.