Saqib_theleo Posted November 29, 2013 Share Posted November 29, 2013 (edited) Hello all there, I tried Macro buttons but could not get what I wanted. Now I am looking for a lisp which can auto select print previous plot and asks for window select 2 points, then shows preview and then print. I hope some one can make this simple Lisp. Thanks. Edited November 30, 2013 by Saqib_theleo Quote Link to comment Share on other sites More sharing options...
Saqib_theleo Posted November 30, 2013 Author Share Posted November 30, 2013 (defun c:ppp () (command "-plot" "no" "" "previous plot" "" "" "y" "n") (command "preview") (princ) ) I found this one but don't know where to put window selection mode? Quote Link to comment Share on other sites More sharing options...
Saqib_theleo Posted May 15, 2015 Author Share Posted May 15, 2015 Hello everyone, Can someone make a Plot Lisp from these commands. I need to select windows,preview and then print. Manual commands... Command: -plot Detailed plot configuration? [Yes/No] : y Enter a layout name or [?] : Enter an output device name or [?] : Enter paper size or [?] : Enter paper units [inches/Millimeters] : Enter drawing orientation [Portrait/Landscape] : Plot upside down? [Yes/No] : Enter plot area [Display/Extents/Limits/View/Window] : Enter lower left corner of window : Enter upper right corner of window : Enter plot scale (Plotted Inches=Drawing Units) or [Fit] : Enter plot offset (x,y) or :Plot with plot styles? [Yes/No] : Enter plot style table name or [?] (enter . for none) : Plot with lineweights? [Yes/No] : Enter shade plot setting [As displayed/Wireframe/Hidden/Visual styles/Rendered] : Write the plot to a file [Yes/No] : Save changes to page setup [Yes/No]? y Proceed with plot [Yes/No] : Effective plotting area: 11.34 wide by 8.02 high Plotting viewport 2. If someone can make this Lisp I'll be thankful. Thanks. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted May 16, 2015 Share Posted May 16, 2015 There are lots of examples here to do plots using lisp, we have multiple setups so just pick the correct printer from a menu which has all the correct options built in and out they come. Not sure about the preview 1st pretty sure this question was asked very recently. Here is an example http://www.cadtutor.net/forum/showthread.php?69132-Printing-LISP-Help...&highlight=Printing-LISP Quote Link to comment Share on other sites More sharing options...
Saqib_theleo Posted May 16, 2015 Author Share Posted May 16, 2015 Hi Bigal, Thanks for your reply, I have checked that link you told. But this is not working as I want. If 1st preview is not possible then it is no problem. Is this possible to make Lisp from these commands I copied from CAD. Thanks. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted May 18, 2015 Share Posted May 18, 2015 My question is why use "previous plot" are you not using the same printer all the time ? Or is the problem that your drawings are all over the place with no drafting standards. I have some help correcting that also. Quote Link to comment Share on other sites More sharing options...
Saqib_theleo Posted May 18, 2015 Author Share Posted May 18, 2015 Hi Bigal, Thanks for reply. All drawings were first printed with other printer and were saved with these settings by "Apply to Layout" button. Now I want to print these drawings as PDF with Nitro PDF Creator with all previous settings (which were applied to first PDF print) except a little changing in Plot area by selecting with "Window select" option. Thanks. Quote Link to comment Share on other sites More sharing options...
Commandobill Posted May 18, 2015 Share Posted May 18, 2015 This should suit your needs: (defun c:prprev ( / firstCorner otherCorner) (if (setq firstCorner (getpoint "\n Specify first corner: ")) (if (setq otherCorner (getcorner firstCorner "\n Specify opposite corner: ")) (command "-plot" "yes" "Model" "Nitro PDF Creator (Pro 9)" "A4 Rotated" "Inches" "Landscape" "No" "Window" firstCorner otherCorner "Fit" "Center" "No" "" "Yes" "As displayed" "n" "y" "y") (princ "\n Invalid Input. Command Cancelled") ) (princ "\n Invalid Input. Command Cancelled") ) ) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted May 19, 2015 Share Posted May 19, 2015 If you want to plot all layouts but a new window setting for say a different title block then just simply edit the link to the code I posted "-6,-6" & "807,560" and save as the name of the new title block then its ready to go next time. Quote Link to comment Share on other sites More sharing options...
Saqib_theleo Posted May 19, 2015 Author Share Posted May 19, 2015 Hello Commandobill, The code is working as I need. Thanks for your time and help. Now I can select new window for every drawing, is there any possibility to see preview before printing. Thanks again. GBY. Quote Link to comment Share on other sites More sharing options...
Commandobill Posted May 19, 2015 Share Posted May 19, 2015 I tested this once with success, but any time there is user input required that isn't controlled by lisp, it can be touchy... (defun c:prprev ( / firstCorner otherCorner) (if (setq firstCorner (getpoint "\n Specify first corner: ")) (if (setq otherCorner (getcorner firstCorner "\n Specify opposite corner: ")) (progn (command "-plot" "yes" "Model" "Nitro PDF Creator (Pro 9)" "A4 Rotated" "Inches" "Landscape" "No" "Window" firstCorner otherCorner "Fit" "Center" "No" "" "Yes" "As displayed" "n" "y" "n") (command "preview") (command "-plot" "yes" "Model" "Nitro PDF Creator (Pro 9)" "A4 Rotated" "Inches" "Landscape" "No" "Window" firstCorner otherCorner "Fit" "Center" "No" "" "Yes" "As displayed" "n" "y" "y") ) (princ "\n Invalid Input. Command Cancelled") ) (princ "\n Invalid Input. Command Cancelled") ) ) Quote Link to comment Share on other sites More sharing options...
Saqib_theleo Posted May 20, 2015 Author Share Posted May 20, 2015 Hello Commandobill, It shows preview first but if you take print from preview by right clicking, after print it takes print again for the 2nd time. So you have to hit escape when you see preview. Not big issue. Thanks. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted May 21, 2015 Share Posted May 21, 2015 Commandobill rather than plot second time maybe plot anyway and ask after Preview are you happy if NO use Vl-file-delete. 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.