<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PUBLISH command causes fatal error in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/publish-command-causes-fatal-error/m-p/309866#M60403</link>
    <description>Well, first off why are you setting variables thru lisp in a button? &lt;BR /&gt;
Buttons are for macros - why make things hard? Just use ^C^C-&lt;BR /&gt;
vbarun;jadda;setvar;useri1;(getvar"filedia");filedia;0;-&lt;BR /&gt;
publish;"....dsd";filedia;(getvar"useri1");&lt;BR /&gt;
&lt;BR /&gt;
Second, why not include all of this in your vba program to begin with?&lt;BR /&gt;
&lt;BR /&gt;
Third, what does jadda do? It could be causing an problem with the &lt;BR /&gt;
publish command.&lt;BR /&gt;
___________________________&lt;BR /&gt;
Mike Tuersley&lt;BR /&gt;
AutoCAD Clinic&lt;BR /&gt;
Rand IMAGINiT Technologies</description>
    <pubDate>Thu, 25 Sep 2003 13:25:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2003-09-25T13:25:22Z</dc:date>
    <item>
      <title>PUBLISH command causes fatal error</title>
      <link>https://forums.autodesk.com/t5/vba-forum/publish-command-causes-fatal-error/m-p/309865#M60402</link>
      <description>Hi&lt;BR /&gt;
&lt;BR /&gt;
I've made an VBA macro that makes a *.DSD file. Then I use the -PUBLISH&lt;BR /&gt;
command with the dsd-file as an argument to create a multipage DWF.&lt;BR /&gt;
However...&lt;BR /&gt;
If a VBA macro is run directly before the publish command is issued, a Fatal&lt;BR /&gt;
Error occurs.&lt;BR /&gt;
i.e. if i place THIS on a button:&lt;BR /&gt;
&lt;BR /&gt;
^C^C-vbarun;Jadda;(setq oldDia (getvar "FILEDIA"))(setvar "FILEDIA"&lt;BR /&gt;
0)(command "_-PUBLISH" "C:/Documents and Settings/6TROLIE/Local&lt;BR /&gt;
Settings/Temp/MPDWF.DSD")(setvar "FILEDIA" oldDia);&lt;BR /&gt;
&lt;BR /&gt;
AutoCAD crashes when I press it.&lt;BR /&gt;
&lt;BR /&gt;
iI i put&lt;BR /&gt;
&lt;BR /&gt;
^C^C-vbarun;Jadda;&lt;BR /&gt;
&lt;BR /&gt;
and&lt;BR /&gt;
&lt;BR /&gt;
(setq oldDia (getvar "FILEDIA"))(setvar "FILEDIA" 0)(command "_-PUBLISH"&lt;BR /&gt;
"C:/Documents and Settings/6TROLIE/Local Settings/Temp/MPDWF.DSD")(setvar&lt;BR /&gt;
"FILEDIA" oldDia);&lt;BR /&gt;
&lt;BR /&gt;
on two separate buttons, and press them in order, everything works fine.&lt;BR /&gt;
The DVB file only consist of 1 module with this:&lt;BR /&gt;
&lt;BR /&gt;
Public Sub Jadda()&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I've tried this on both AutoCAD 2004, Architectural Desktop 2004 and&lt;BR /&gt;
Mechanical 2004.&lt;BR /&gt;
Does anyone know anything about this?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
&lt;BR /&gt;
Trond Hasse Lie</description>
      <pubDate>Thu, 25 Sep 2003 11:57:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/publish-command-causes-fatal-error/m-p/309865#M60402</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-09-25T11:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: PUBLISH command causes fatal error</title>
      <link>https://forums.autodesk.com/t5/vba-forum/publish-command-causes-fatal-error/m-p/309866#M60403</link>
      <description>Well, first off why are you setting variables thru lisp in a button? &lt;BR /&gt;
Buttons are for macros - why make things hard? Just use ^C^C-&lt;BR /&gt;
vbarun;jadda;setvar;useri1;(getvar"filedia");filedia;0;-&lt;BR /&gt;
publish;"....dsd";filedia;(getvar"useri1");&lt;BR /&gt;
&lt;BR /&gt;
Second, why not include all of this in your vba program to begin with?&lt;BR /&gt;
&lt;BR /&gt;
Third, what does jadda do? It could be causing an problem with the &lt;BR /&gt;
publish command.&lt;BR /&gt;
___________________________&lt;BR /&gt;
Mike Tuersley&lt;BR /&gt;
AutoCAD Clinic&lt;BR /&gt;
Rand IMAGINiT Technologies</description>
      <pubDate>Thu, 25 Sep 2003 13:25:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/publish-command-causes-fatal-error/m-p/309866#M60403</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-09-25T13:25:22Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/publish-command-causes-fatal-error/m-p/309867#M60404</link>
      <description>Well I could of course use standard commands for the FILEDIA oart, but you&lt;BR /&gt;
HAVE to use lisp for the PUBLISH command. Try using a \ (Backslash) in the&lt;BR /&gt;
command and you'll know what i mean.&lt;BR /&gt;
&lt;BR /&gt;
Second.. I've tried using Sendcommand etc. for the Publish-part, but it&lt;BR /&gt;
fatal errors then too. The Publish command doesn't have an API so I have to&lt;BR /&gt;
use sendcommand. And the REASON I use the Publish command is that it is the&lt;BR /&gt;
only way to make a MulitPage DWF via VBA.&lt;BR /&gt;
&lt;BR /&gt;
Third.. As I wrote.. "Jadda" does NOTHING. the code is:&lt;BR /&gt;
Public Sub Jadda()&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
The problem is: IF I run a VBA macro (even if the macro doesn't do anything)&lt;BR /&gt;
right before executing the publishcommand, Autocad crashes. If I run the VBA&lt;BR /&gt;
macro on one button, and run the publishcommand on another button,&lt;BR /&gt;
everything is just fine.&lt;BR /&gt;
&lt;BR /&gt;
Trond Hasse Lie&lt;BR /&gt;
&lt;BR /&gt;
"Mike Tuersley" &lt;MTUERSLEY&gt; wrote in message&lt;BR /&gt;
news:MPG.19dd27363c43e26498977a@discussion.autodesk.com...&lt;BR /&gt;
&amp;gt; Well, first off why are you setting variables thru lisp in a button?&lt;BR /&gt;
&amp;gt; Buttons are for macros - why make things hard? Just use ^C^C-&lt;BR /&gt;
&amp;gt; vbarun;jadda;setvar;useri1;(getvar"filedia");filedia;0;-&lt;BR /&gt;
&amp;gt; publish;"....dsd";filedia;(getvar"useri1");&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Second, why not include all of this in your vba program to begin with?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Third, what does jadda do? It could be causing an problem with the&lt;BR /&gt;
&amp;gt; publish command.&lt;BR /&gt;
&amp;gt; ___________________________&lt;BR /&gt;
&amp;gt; Mike Tuersley&lt;BR /&gt;
&amp;gt; AutoCAD Clinic&lt;BR /&gt;
&amp;gt; Rand IMAGINiT Technologies&lt;/MTUERSLEY&gt;</description>
      <pubDate>Thu, 25 Sep 2003 13:25:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/publish-command-causes-fatal-error/m-p/309867#M60404</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-09-25T13:25:22Z</dc:date>
    </item>
  </channel>
</rss>

