Jump to content

Previous Plot Lisp help needed...


Recommended Posts

Posted

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.

Posted

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.

Posted

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.

Posted

Hint: start with:

 

Command: -plot 
Detailed plot configuration? [Yes/No] <No>: [color=red]Yes[/color]

Posted
Hint: start with:

 

Command: -plot 
Detailed plot configuration? [Yes/No] <No>: [color=red]Yes[/color]

Still I cannot see option for "Number of Copies".......

Posted

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.

Posted

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

Posted

Thank you both Lee Mac & CAD89. Its fine now.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...