Author Topic: Need help with the plotting command in LISP  (Read 3996 times)

0 Members and 1 Guest are viewing this topic.

Fabricio28

  • Swamp Rat
  • Posts: 666
Need help with the plotting command in LISP
« 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
« Last Edit: September 10, 2014, 08:40:17 AM by FABRICIO28 »

ChrisCarlson

  • Guest
Re: Need help with the plotting command in LISP
« Reply #1 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";;;;;;;;


Fabricio28

  • Swamp Rat
  • Posts: 666
Re: Need help with the plotting command in LISP
« Reply #2 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?

« Last Edit: September 10, 2014, 09:09:19 AM by FABRICIO28 »

ChrisCarlson

  • Guest
Re: Need help with the plotting command in LISP
« Reply #3 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.

Fabricio28

  • Swamp Rat
  • Posts: 666
Re: Need help with the plotting command in LISP
« Reply #4 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

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Need help with the plotting command in LISP
« Reply #5 on: September 10, 2014, 09:48:56 AM »
You could also look into plotter pagesetups and sheet set manager.
CAB has a plottabs routine that works well.
And some code to apply a pagesetup to all layouts.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Fabricio28

  • Swamp Rat
  • Posts: 666
Re: Need help with the plotting command in LISP
« Reply #6 on: September 10, 2014, 10:41:48 AM »
Thank you Ron,

Great routine. Thank you very much!

Fabricio28

  • Swamp Rat
  • Posts: 666
Re: Need help with the plotting command in LISP
« Reply #7 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)
)

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Need help with the plotting command in LISP
« Reply #8 on: September 11, 2014, 03:32:54 PM »
Use
Code - Auto/Visual Lisp: [Select]
  8)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Fabricio28

  • Swamp Rat
  • Posts: 666
Re: Need help with the plotting command in LISP
« Reply #9 on: September 11, 2014, 04:03:06 PM »
very clever Ron :)

How Can I put inside the code to repeat once?

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Need help with the plotting command in LISP
« Reply #10 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"))




Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Fabricio28

  • Swamp Rat
  • Posts: 666
Re: Need help with the plotting command in LISP
« Reply #11 on: September 11, 2014, 04:17:41 PM »
wonderful! :)

Thank you very much Ron!

Sorry for my stupid question.  :embarrassed:

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Need help with the plotting command in LISP
« Reply #12 on: September 11, 2014, 06:04:08 PM »
Glad to help  :)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

RC

  • Guest
Re: Need help with the plotting command in LISP
« Reply #13 on: September 12, 2014, 12:27:06 PM »
PUBLISH a saved pagesetup to a PDF and then print however many you need ......  :-)

Fabricio28

  • Swamp Rat
  • Posts: 666
Re: Need help with the plotting command in LISP
« Reply #14 on: September 12, 2014, 12:39:31 PM »
Thank you Randy Culp :)