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)
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
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.
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.
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.