SendCommand PUBLISH Generating Fatal Error

Discussion in 'AutoCAD' started by TomD, Jul 14, 2004.

  1. TomD

    TomD Guest

    Anyone have any thoughts why the following would generate a fatal error:

    FATAL ERROR: Unhandled Access Violation Reading 0x655f778 Exception at
    62d2eab0h

    The *.dsd file works fine when called from the PUBLISH command.

    Sub RunDsdOnly()
    Dim sDsd As String, sCmd As String

    sDsd = "c:\windows\temp\cecdwflogtemp.dsd"
    ThisDrawing.Save
    sCmd = "-PUBLISH" & vbCr & DsdFileName & vbCr
    ThisDrawing.SendCommand sCmd

    End Sub

    (Acad 2004, LDD)
     
    TomD, Jul 14, 2004
    #1
  2. TomD

    TomD Guest

    Odd note:

    Taking the vbCr off of the end and all is well, except that the user would
    have press enter to actually have the file written.

    sCmd = "-PUBLISH" & vbCr & DsdFileName '<<Works fine
     
    TomD, Jul 14, 2004
    #2
  3. TomD

    TomD Guest

    This is apparently a 'known' problem with SendCommand, though I haven't
    found any real solution or full explanation.

    ....in case anyone else is following this thread.
     
    TomD, Jul 14, 2004
    #3
  4. TomD

    Peterw Guest

    Using version 2004, I ran into this bug about a year ago. My solution was to run publish through lisp. I figured out the format of the 'dsd' text file, built it in lisp, then execute it.
    Apparently the bug was not fixed in 2005.
     
    Peterw, Jul 14, 2004
    #4
  5. TomD

    TomD Guest

    Thank you, very much, Peter.

    FWIW, passing {ENTER} via SendKeys appears to be an acceptable VBA
    alternative.

    If Not .Saved Then .Save
    sCmd = "-PUBLISH" & vbCr & DsdFileName
    .SendCommand sCmd
    SendKeys "{ENTER}", True

    This is testing well for me, initially. (I REALLY don't want to write my
    ADO stuff in lisp.......lol). I haven't fully tested this, yet, so there
    may be issues.

    to run publish through lisp. I figured out the format of the 'dsd' text
    file, built it in lisp, then execute it.
     
    TomD, Jul 14, 2004
    #5
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.