JLG Posted December 16, 2009 Share Posted December 16, 2009 I need this command to pause so the user can select the window to plot to. then after it needs to continue through the function. (defun C:GPDF () (command "-plot" "Y" "" "Adobe PDF" "Letter" "" "" "" "W" "FIT" "" "" "" "PDF plot.ctb" "" "" "N" "N" "") (princ "\PDF created") (princ) ) Quote Link to comment Share on other sites More sharing options...
Archiman86 Posted December 16, 2009 Share Posted December 16, 2009 I am sure that other people can give you a better solution, but I would do it like this: (defun C:plotPDF (/) (setq window1 (getpoint "\nPick lower left corner of Plot Area:")) (setq window2 (getpoint "\nPick upper right corner of Plot Area:")) (command "-plot" "y" "" "Adobe PDF" "Letter" "" "" "" "W" window1 window2 "FIT" "" "" "PDF plot.ctb" "" "" "N" "N" "") (princ) ) I hope that helps. Quote Link to comment Share on other sites More sharing options...
JLG Posted December 16, 2009 Author Share Posted December 16, 2009 Hmm i'm not sure why but i copied that directly and it didn't work. Wont recognize the -plot function after the window is selected?....and it wont show the window selection box just asks to pick corners. My main goal is to automate creating a PDF. In a pefect world you would press a button and then select a window for the print and it would save and rename the pdf file.....but that i think is a tall order. So im settling for press the button and select a window. Quote Link to comment Share on other sites More sharing options...
Archiman86 Posted December 16, 2009 Share Posted December 16, 2009 are you plotting from model space or paper space? From paper space this works fine. In order to show the rectangle, you need to use much more in depth and complicated programming (VBA.net or ObjectARX...I think). Unfortuantely, I am not sure of a way to use the existing "window" command within a routine. (defun C:plotPDF (/) (setq window1 (getpoint "\nPick lower left corner of Plot Area:")) (setq window2 (getpoint "\nPick upper right corner of Plot Area:")) (command "-plot" "y" "" "Adobe PDF" "Letter" "" "" "" "W" window1 window2 "FIT" "" "" "monochrome.ctb" "" "" "N" "N" "" "" "") (princ) ) I did notice, as you mentioned that this does not work when plotting out of model space. I am not sure why. Maybe someone else can help you out more. I am no expert. Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted December 16, 2009 Share Posted December 16, 2009 In order to show the rectangle, you need to use much more in depth and complicated programming (VBA.net or ObjectARX...I think). You can do it like this. (setq pt2 (getcorner (setq pt1 (getpoint "\nSelect first point: ") ) "\nSelect second point: " ) ) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 17, 2009 Share Posted December 17, 2009 In order to show the rectangle, you need to use much more in depth and complicated programming (VBA.net or ObjectARX...I think). No offence, but I did lol... Quote Link to comment Share on other sites More sharing options...
Archiman86 Posted December 17, 2009 Share Posted December 17, 2009 Yeah, no offense taken. Thats why I said "I think" and earlier that "I am no expert"....but hey I appreciate it. You learn something new every day! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.