+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Forum Newbie musaranho's Avatar
    Computer Details
    musaranho's Computer Details
    Operating System:
    notebook:vista home premium desktop:xp sp3
    Computer:
    acer extensa 5620-4801
    CPU:
    pentium dual core
    RAM:
    3 GB
    Using
    AutoCAD 2007
    Join Date
    Mar 2009
    Location
    Brasil
    Posts
    2

    Default VBA SaveAS Run-time error '-2145320861...

    Registered forum members do not see this ad.

    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!

  2. #2
    Forum Newbie
    Using
    AutoCAD 2008
    Join Date
    Mar 2009
    Posts
    1

    Default

    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.

  3. #3
    Forum Newbie musaranho's Avatar
    Computer Details
    musaranho's Computer Details
    Operating System:
    notebook:vista home premium desktop:xp sp3
    Computer:
    acer extensa 5620-4801
    CPU:
    pentium dual core
    RAM:
    3 GB
    Using
    AutoCAD 2007
    Join Date
    Mar 2009
    Location
    Brasil
    Posts
    2

    Default

    AutoCad 2007 and XP SP3.

  4. #4
    Forum Newbie
    Using
    AutoCAD 2012
    Join Date
    Mar 2012
    Location
    Smelly North West Indiana
    Posts
    2

    Default Any resolution yet?

    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

    Goofy Dialog Box..JPG
    Last edited by PatrickMoe; 27th Mar 2012 at 03:15 pm. Reason: modify censored word

  5. #5
    Forum Newbie
    Using
    AutoCAD 2012
    Join Date
    Mar 2012
    Location
    Smelly North West Indiana
    Posts
    2

    Default

    Registered forum members do not see this ad.

    I had to post one more to laugh at the fact that the word d e b u g g e r got censored.

Similar Threads

  1. Macro to open a dwg, then SAVEAS?
    By dcowell in forum AutoLISP, Visual LISP & DCL
    Replies: 8
    Last Post: 30th Oct 2008, 07:03 pm
  2. Saveas dwgname_rev1
    By jbergoon in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 8th Aug 2008, 10:05 pm
  3. SaveAs() VBA function
    By opelit in forum AutoLISP, Visual LISP & DCL
    Replies: 0
    Last Post: 28th Nov 2006, 02:41 pm
  4. Saveas - dated folder
    By AWOL in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 13th Apr 2005, 07:15 pm
  5. SaveAs Dwg in an earlier version
    By Maurice Williams in forum AutoCAD Drawing Management & Output
    Replies: 12
    Last Post: 28th Jun 2004, 11:32 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts