Saqib_theleo Posted December 3, 2012 Posted December 3, 2012 Hi all, I wanted a lisp to plot "Previous Plot" but with five number of copies. I found this lisp it can plot 1 copy at a time. (defun c:pp () (command "-plot" "no" "" "previous plot" "" "" "" "") (princ) ) Is this possible to make this Lisp as I need, if I copy that command in same Lisp five times it sends five plots to printer but when we do manual from Plot command with five numbers of copies it only sends one plot to printer. Hope you understand. Thanks. Quote
Lee Mac Posted December 3, 2012 Posted December 3, 2012 Type -PLOT at the command-line and follow the prompts as you would do manually to plot five copies of the 'previous plot', and note each option that you select in the command. Substitute double quotation marks ("") for the times that you pressed 'Enter' and you have your LISP program. Quote
Saqib_theleo Posted December 3, 2012 Author Posted December 3, 2012 Hi Lee Mac, I did as you said but I couldn't figure out where to give it 5 number of copies. Command: -plot Detailed plot configuration? [Yes/No] <No>: Enter a layout name or [?] <Layout>: Enter a page setup name <>: Enter an output device name or [?] <HP LaserJet Professional P1566>: Write the plot to a file [Yes/No] <N>: Save changes to page setup [Yes/No]? <N> Proceed with plot [Yes/No] <Y>: Effective plotting area: 201.61 wide by 285.01 high Effective plotting area: 91.27 wide by 226.19 high Plotting viewport 3. Effective plotting area: 93.47 wide by 226.19 high Plotting viewport 2. Plotting viewport 1. Quote
Lee Mac Posted December 3, 2012 Posted December 3, 2012 Hint: start with: Command: -plot Detailed plot configuration? [Yes/No] <No>: [color=red]Yes[/color] Quote
BIGAL Posted December 4, 2012 Posted December 4, 2012 Have a look at this post you will see the Detailed plot is set to yes http://www.cadtutor.net/forum/showthread.php?69132-Printing-LISP-Help...&highlight=Printing-LISP Quote
Saqib_theleo Posted December 5, 2012 Author Posted December 5, 2012 Hint: start with: Command: -plot Detailed plot configuration? [Yes/No] <No>: [color=red]Yes[/color] Still I cannot see option for "Number of Copies"....... Quote
Lee Mac Posted December 5, 2012 Posted December 5, 2012 Sorry, maybe: (defun c:pp5 ( ) (repeat 5 (command "_.-plot" "_N" "" "previous plot" "" "" "" "" "_.delay" 2000)) (princ) ) I have included a 2 second delay between plots in case there are problems with instantly repeating the plot command. Quote
CAD89 Posted December 5, 2012 Posted December 5, 2012 Or you can add another option to set the Number of copies manually: (defun c:pp5 (/ nocp) (setq nocp (getint "\nSet the number of copies: ")) (repeat nocp (command "_.-plot" "_N" "" "previous plot" "" "" "" "" "_.delay" 2000)) (princ) ) With regards CAD_89 Quote
Saqib_theleo Posted December 6, 2012 Author Posted December 6, 2012 Thank you both Lee Mac & CAD89. Its fine now. Quote
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.