TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Fabricio28 on September 10, 2014, 08:26:38 AM

Title: Need help with the plotting command in LISP
Post by: Fabricio28 on September 10, 2014, 08:26:38 AM
Hi guys,
 
I need to use  a LISP to printing my file.

Name: HP Color LaserJet 500
Plotter: HP Color Laser Jet 5/5M PS - Windows System Driver - by Autodesk
Paper size: A4
Plot area: Window (It's already selected)
Plot offset: Center the plot
Plot scale: Fit to paper
Number of copies: 2

Anybody Can help me please?

Thank you
Title: Re: Need help with the plotting command in LISP
Post by: ChrisCarlson on September 10, 2014, 08:41:23 AM
Why do you need a lisp routine for this? Would make a much easier macro routine. 

^C^C-plot;"Y";;"HP Color Laser Jet 5/5M PS - Windows System Driver - by Autodesk.pc3";"A4";"Inches";"Landscape";"N";"W";;;"F";"C";;;;;;;;^C^C-plot;"Y";;"HP Color Laser Jet 5/5M PS - Windows System Driver - by Autodesk.pc3";"A4";"Inches";"Landscape";"N";"W";;;"F";"C";;;;;;;;

Title: Re: Need help with the plotting command in LISP
Post by: Fabricio28 on September 10, 2014, 08:57:43 AM
I've never used macro.
But I'll try use it.

I created a macro with the routine and when I run nothing happen.

Could you help me please?

Title: Re: Need help with the plotting command in LISP
Post by: ChrisCarlson on September 10, 2014, 09:06:35 AM
http://www.wikihow.com/Create-a-New-Command-on-Autocad

For the command paste the following

Code: [Select]
^C^C-plot;"Y";;"HP Color Laser Jet 5/5M PS - Windows System Driver - by Autodesk.pc3";"A4";"Inches";"Landscape";"N";"W";;;"F";"C";;;;;;;;^C^C-plot;"Y";;"HP Color Laser Jet 5/5M PS - Windows System Driver - by Autodesk.pc3";"A4";"Inches";"Landscape";"N";"W";;;"F";"C";;;;;;;;
I think this is correct but I cannot test it.
Title: Re: Need help with the plotting command in LISP
Post by: Fabricio28 on September 10, 2014, 09:24:16 AM
Thank you Chris,
I'll test it later and I let you know.

Thank you very much!

Regards
Title: Re: Need help with the plotting command in LISP
Post by: ronjonp on September 10, 2014, 09:48:56 AM
You could also look into plotter pagesetups and sheet set manager.
CAB has a plottabs (http://www.theswamp.org/index.php?topic=1916.msg24899#msg24899) routine that works well.
And some code (http://www.theswamp.org/index.php?topic=38005.msg430212#msg430212) to apply a pagesetup to all layouts.
Title: Re: Need help with the plotting command in LISP
Post by: Fabricio28 on September 10, 2014, 10:41:48 AM
Thank you Ron,

Great routine. Thank you very much!
Title: Re: Need help with the plotting command in LISP
Post by: Fabricio28 on September 11, 2014, 01:35:55 PM
Hi all,

I got this routine and I wanna take 2 copies.
Anyone can help me make that modification, please?

Regards

Code: [Select]
(defun c:PP (); Plot Previous
  (command "-plot" "no" "" "previous plot" "" "n" "n" "y")
  (princ)
)
 
(defun c:PPP (); Plot Preview Previous
  (command "undo" "be")
  (command "-plot" "no" "" "previous plot" "" "n" "y" "n")
  (command "preview")
  (command "undo" "e")
  (command "undo" "1")
  (command "regenall")
  (princ)
)
Title: Re: Need help with the plotting command in LISP
Post by: ronjonp on September 11, 2014, 03:32:54 PM
Use
Code - Auto/Visual Lisp: [Select]
  8)
Title: Re: Need help with the plotting command in LISP
Post by: Fabricio28 on September 11, 2014, 04:03:06 PM
very clever Ron :)

How Can I put inside the code to repeat once?
Title: Re: Need help with the plotting command in LISP
Post by: ronjonp on September 11, 2014, 04:09:37 PM
very clever Ron :)

How Can I put inside the code to repeat once?
Code - Auto/Visual Lisp: [Select]
  1. (repeat 2 (command "-plot" "no" "" "previous plot" "" "n" "n" "y"))



Title: Re: Need help with the plotting command in LISP
Post by: Fabricio28 on September 11, 2014, 04:17:41 PM
wonderful! :)

Thank you very much Ron!

Sorry for my stupid question.  :embarrassed:
Title: Re: Need help with the plotting command in LISP
Post by: ronjonp on September 11, 2014, 06:04:08 PM
Glad to help  :)
Title: Re: Need help with the plotting command in LISP
Post by: RC on September 12, 2014, 12:27:06 PM
PUBLISH a saved pagesetup to a PDF and then print however many you need ......  :-)
Title: Re: Need help with the plotting command in LISP
Post by: Fabricio28 on September 12, 2014, 12:39:31 PM
Thank you Randy Culp :)