<?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: LISP for printing from a button in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9056985#M83604</link>
    <description>&lt;P&gt;See if this works.&lt;/P&gt;&lt;PRE&gt;(defun c:PDFLIMITS1=1MM (/ dwg)
	(command "tilemode" "1")
	(command "cmdecho" "1")
	(command "-plot" 
	"y"; detailed configuation
	"MODEL"; layout name
	"Autocad PDF (Smallest File).pc3"; device name
	"ANSI full bleed A (11.00 x 8.50 Inches)"; paper size
	"M"; paper units
	"L"; orientation
	"N"; plot upside down?
	"L"; plot area - Limits
	"1=1"; scale
	"CENTER"; Offset
	"N"; plot with styles?
	"."; style table name
	"Y"; plot with lineweights?
	"A"; shade plot setting
	(strcat "C:\\temp\\"(getvar 'dwgprefix) (substr (setq dwg  (getvar 'dwgname)) 1 (- (strlen dwg) 4)) ".pdf")
	"y"
	"Y"
	)
  	(princ)
)&lt;/PRE&gt;</description>
    <pubDate>Mon, 30 Sep 2019 13:59:30 GMT</pubDate>
    <dc:creator>Jonathan3891</dc:creator>
    <dc:date>2019-09-30T13:59:30Z</dc:date>
    <item>
      <title>LISP for printing from a button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9056649#M83603</link>
      <description>&lt;P&gt;I'm having a problem with a LISP routine for printing to a pdf file.&amp;nbsp; I have the LISP working as desired - but only if I type the command into the command prompt.&amp;nbsp; What I would like to do is run the command from a button on the ribbon.&amp;nbsp; But when I do that, the LISP gets hung up on the step where it saves the file to a folder.&amp;nbsp; Can anyone tell me what am I doing wrong?&amp;nbsp; I don't understand why the same command works differently when entered command line vs. button.&amp;nbsp; Attached is my lisp file.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 11:32:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9056649#M83603</guid>
      <dc:creator>tims79</dc:creator>
      <dc:date>2019-09-30T11:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: LISP for printing from a button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9056985#M83604</link>
      <description>&lt;P&gt;See if this works.&lt;/P&gt;&lt;PRE&gt;(defun c:PDFLIMITS1=1MM (/ dwg)
	(command "tilemode" "1")
	(command "cmdecho" "1")
	(command "-plot" 
	"y"; detailed configuation
	"MODEL"; layout name
	"Autocad PDF (Smallest File).pc3"; device name
	"ANSI full bleed A (11.00 x 8.50 Inches)"; paper size
	"M"; paper units
	"L"; orientation
	"N"; plot upside down?
	"L"; plot area - Limits
	"1=1"; scale
	"CENTER"; Offset
	"N"; plot with styles?
	"."; style table name
	"Y"; plot with lineweights?
	"A"; shade plot setting
	(strcat "C:\\temp\\"(getvar 'dwgprefix) (substr (setq dwg  (getvar 'dwgname)) 1 (- (strlen dwg) 4)) ".pdf")
	"y"
	"Y"
	)
  	(princ)
)&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Sep 2019 13:59:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9056985#M83604</guid>
      <dc:creator>Jonathan3891</dc:creator>
      <dc:date>2019-09-30T13:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: LISP for printing from a button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9057323#M83605</link>
      <description>&lt;P&gt;Not quite.&amp;nbsp; I think that is adding the current drawing prefix, when I was already specifying C:\Temp\.&amp;nbsp; If I remove the&amp;nbsp;&amp;nbsp;(getvar 'dwgprefix)&amp;nbsp; I am right back where I started.&amp;nbsp; It works from the command line but not from a button.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 15:51:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9057323#M83605</guid>
      <dc:creator>tims79</dc:creator>
      <dc:date>2019-09-30T15:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: LISP for printing from a button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9057374#M83606</link>
      <description>&lt;P&gt;OK, that was untested.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tested this and it works with a button.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:ttt (/ )
	(command "tilemode" "1")
	(command "cmdecho" "1")
	(command "-plot" 
	"y"; detailed configuation
	"MODEL"; layout name
	"Autocad PDF (Smallest File).pc3"; device name
	"ANSI full bleed A (11.00 x 8.50 Inches)"; paper size
	"M"; paper units
	"L"; orientation
	"N"; plot upside down?
	"L"; plot area - Limits
	"1=1"; scale
	"CENTER"; Offset
	"N"; plot with styles?
	"."; style table name
	"Y"; plot with lineweights?
	"A"; shade plot setting
	(strcat "C:\\temp\\" (substr (getvar 'dwgname) 1 (- (strlen (getvar 'dwgname)) 4)) ".pdf")
	"y"
	"Y"
	)
  	(princ)
)&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Sep 2019 16:04:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9057374#M83606</guid>
      <dc:creator>Jonathan3891</dc:creator>
      <dc:date>2019-09-30T16:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: LISP for printing from a button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9057379#M83607</link>
      <description>&lt;P&gt;I think your problem is the name of your command. take the equals (=) sign out of your defun statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 16:08:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9057379#M83607</guid>
      <dc:creator>SeeMSixty7</dc:creator>
      <dc:date>2019-09-30T16:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: LISP for printing from a button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9057572#M83608</link>
      <description>&lt;P&gt;When you assigned a button to run it, for the button did you just enter ttt for the macro?&amp;nbsp; That isn't working for me, but it does work to enter ttt in the command line.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 17:28:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9057572#M83608</guid>
      <dc:creator>tims79</dc:creator>
      <dc:date>2019-09-30T17:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: LISP for printing from a button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9057582#M83609</link>
      <description>&lt;P&gt;The button command is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;^C^Cttt&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Sep 2019 17:30:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9057582#M83609</guid>
      <dc:creator>Jonathan3891</dc:creator>
      <dc:date>2019-09-30T17:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: LISP for printing from a button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9057600#M83610</link>
      <description>&lt;P&gt;This is what has been driving me crazy.&amp;nbsp; I get the same hanging result with ^C^Cttt.&amp;nbsp; Attached is a screencap of my Autocad text window when running it from a button.&amp;nbsp; It looks like something goes wrong when saving the pdf.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which version of Autocad are you using?&amp;nbsp; I have 2019&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 17:37:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9057600#M83610</guid>
      <dc:creator>tims79</dc:creator>
      <dc:date>2019-09-30T17:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: LISP for printing from a button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9058130#M83611</link>
      <description>&lt;P&gt;I loaded your Lisp and added a macro to my toolbar.&lt;/P&gt;&lt;P&gt;It works for me, even with the =. (Autocad 2019)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The filename does not match,&amp;nbsp; the command string is off by one line.&lt;/P&gt;&lt;P&gt;Perhaps the plot string keystrokes where created while in paper space?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the menu macro is using lisp commands to load the lisp first then check that code again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 21:05:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9058130#M83611</guid>
      <dc:creator>Scottu2</dc:creator>
      <dc:date>2019-09-30T21:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: LISP for printing from a button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9058661#M83612</link>
      <description>&lt;P&gt;Have a look here as well plots a range of pdf's&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-print-multiple-plots-in-a-row/td-p/9049461" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-print-multiple-plots-in-a-row/td-p/9049461&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 05:34:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9058661#M83612</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2019-10-01T05:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: LISP for printing from a button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9071099#M83613</link>
      <description>&lt;P&gt;The arrow you made pointing to the filename not matching - that is the problem. Something is going wrong at that point - but ONLY when I run the command from a button macro. If I type the command in it works perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The macro is simply the same command as I am typing manually, not loading a lisp first. The lisp is already loaded, verified by the fact that it works manually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there some setting related to macros and the writing of files/directories? Security or permission setting? I am at a loss.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="iframe-container"&gt;&lt;IFRAME width="640" height="590" src="https://screencast.autodesk.com/Embed/Timeline/31ff29dc-b0a8-4b76-a12e-821cddc539f4" frameborder="0" scrolling="no" allowfullscreen="allowfullscreen" webkitallowfullscreen="webkitallowfullscreen"&gt;&lt;/IFRAME&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 14:30:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9071099#M83613</guid>
      <dc:creator>tims79</dc:creator>
      <dc:date>2019-10-07T14:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: LISP for printing from a button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9071323#M83614</link>
      <description>&lt;P&gt;The arrow you made pointing to the filename not matching - that is the problem. Something is going wrong at that point - but ONLY when I run the command from a button macro. If I type the command in it works perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The macro is simply the same command as I am typing manually, not loading a lisp first. The lisp is already loaded, verified by the fact that it works manually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there some setting related to macros and the writing of files/directories? Security or permission setting? I am totally at a loss.&lt;/P&gt;&lt;DIV class="iframe-container"&gt;&lt;IFRAME width="640" height="590" src="https://screencast.autodesk.com/Embed/Timeline/31ff29dc-b0a8-4b76-a12e-821cddc539f4" frameborder="0" scrolling="no" allowfullscreen="allowfullscreen" webkitallowfullscreen="webkitallowfullscreen"&gt;&lt;/IFRAME&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 16:03:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9071323#M83614</guid>
      <dc:creator>tims79</dc:creator>
      <dc:date>2019-10-07T16:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: LISP for printing from a button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9072035#M83615</link>
      <description>&lt;P&gt;Hi Tim79,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When it did my test is was using the tool bar, it see that the ribbon is used here.&lt;/P&gt;&lt;P&gt;Compare the plot command results. See attached screen shot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 22:30:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9072035#M83615</guid>
      <dc:creator>Scottu2</dc:creator>
      <dc:date>2019-10-07T22:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: LISP for printing from a button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9072828#M83616</link>
      <description>&lt;P&gt;Scott&lt;/P&gt;&lt;P&gt;Obviously, I noticed the different results.&amp;nbsp; That is what I don't understand and my whole reason for posting here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You seem to be onto something with the toolbar vs ribbon, though.&amp;nbsp; It works correctly when launched from a toolbar button.&amp;nbsp; So it looks like the problem is with the ribbon interface.&amp;nbsp; That is good enough for me, I will just make a toolbar with the buttons I need.&amp;nbsp; Screw the ribbon!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 10:39:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9072828#M83616</guid>
      <dc:creator>tims79</dc:creator>
      <dc:date>2019-10-08T10:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: LISP for printing from a button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9073519#M83617</link>
      <description>&lt;P&gt;Hello tims79,&lt;/P&gt;&lt;P&gt;Good you got it working.&amp;nbsp; As for the ribbon, the symptom is similar to plotting from LAYOUT vs MODEL space.&amp;nbsp; The layout adds questions regarding to paper space.&lt;/P&gt;&lt;P&gt;Perhaps you can still use the ribbon, by setting a variable to 1 to indicate the routine is to use a different plot command string and the routine sets that variable back to zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 14:35:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9073519#M83617</guid>
      <dc:creator>Scottu2</dc:creator>
      <dc:date>2019-10-08T14:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: LISP for printing from a button</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9074522#M83618</link>
      <description>&lt;P&gt;Hi Tims79,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp; made the ribbon button and ran the routine and it works, on my machine.&lt;/P&gt;&lt;P&gt;I was not able to reproduce the error, so the original code is good.&lt;/P&gt;&lt;P&gt;Attached is the ribbon button AP i created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 20:28:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-printing-from-a-button/m-p/9074522#M83618</guid>
      <dc:creator>Scottu2</dc:creator>
      <dc:date>2019-10-08T20:28:38Z</dc:date>
    </item>
  </channel>
</rss>

