BATCH PRINT BY NAME OF PRINTER

BATCH PRINT BY NAME OF PRINTER

Gaganpatel
Collaborator Collaborator
1,447 Views
27 Replies
Message 1 of 28

BATCH PRINT BY NAME OF PRINTER

Gaganpatel
Collaborator
Collaborator

Dear Sir,

 

I want to batch print to by name of printer lisp file.

Print Paper size A4.

 

 

0 Likes
Accepted solutions (3)
1,448 Views
27 Replies
Replies (27)
Message 2 of 28

Gaganpatel
Collaborator
Collaborator

Dear Sir,

Please help me,

Batch print model by printer.

0 Likes
Message 3 of 28

Sea-Haven
Mentor
Mentor

You will have to edit this code, changing items like block name and plot size, use it as an example of code to do your task NOT solution.

 

; plot all title blocks in model space
; By Alan H 

 (PROMPT ".....PRINTING DRAWING TO plotter....")
(setq oldsnap (getvar "osmode"))
(setvar "osmode" 0)
 
(setq ss2 (ssget "x" '((0 . "INSERT")(2 . "Your block name")(410 . "Model"))))
(setq n (sslength ss2))

(setq index 0)
(repeat n
    (setq en (ssname ss2 index))
    (setq el (entget en))
    (setq inspt (assoc 10 el)) ; insertion pt this is lower left for this code

   (setq xmin (- (cadr inspt) 6.0))
   (setq ymin (- (caddr inspt) 6.0))
   (setq xymin (strcat (rtos xmin 2 1) "," (rtos ymin 2 1)))

   (setq xmax (+ xmin 813.0)) ; hard coded for 813 wide 6mm offset
   (setq ymax (+ ymin 566.0)) ;hard code for 566 high
   (setq xymax (strcat (rtos xmax 2 1) "," (rtos ymax 2 1)))


  (COMMAND "-PLOT"  "Y"     "" "your printer name"
	       "A3"	"M"     "LANDSCAPE"   "N"
	       "W"	  xymin   xymax "1=2"  "C"
	       "y"	  "Designlaser.ctb"      "Y"   ""	"n"   "n"
	       "y"	
    )
   
  (setq index (+ index 1))

)

(setvar "osmode" oldsnap)
(princ)
0 Likes
Message 4 of 28

Gaganpatel
Collaborator
Collaborator

Dear Sir,

 

Thanks for Replay.

Please added command name for batch print .

 

0 Likes
Message 5 of 28

Sea-Haven
Mentor
Mentor

Add (defun c:batp ( / ) as 1st line and a ) as last line, then appload and type batp. You have to edit the code to match your block name and size. A good learn lisp task.

0 Likes
Message 6 of 28

Gaganpatel
Collaborator
Collaborator

Dear Sir,

 

Thanks for replay

lisp file appload and command type problem massage Y unknown command.

Please modify printer name is defult printer.

 

Gaganpatel_1-1690174954880.png

 

 

0 Likes
Message 7 of 28

Gaganpatel
Collaborator
Collaborator

Any Body please help me.

0 Likes
Message 8 of 28

Gaganpatel
Collaborator
Collaborator

Dear Sir,

 

lisp file appload and command type problem massage Y unknown command Please see the attached image

Please modify  printer name is default printer.

Help me Sir.

Gaganpatel_0-1690391448551.png

 

0 Likes
Message 9 of 28

Sea-Haven
Mentor
Mentor

Check spelling of this "Manochrome.ctb" Monochrome.ctb ?

 

Also size not 1=2 but 1=1.

 

Will try to test using "dwg to pdf"

 

 

0 Likes
Message 10 of 28

Gaganpatel
Collaborator
Collaborator

Dear Sir,

2 problem for printing

1) Print fit to paper (Required)

2) Print start left to right ( Required)

Please help sir

0 Likes
Message 11 of 28

Sea-Haven
Mentor
Mentor

There was a post by Paullimapa that sorted the plots by left to right then move up a row. He may see this post and respond.

0 Likes
Message 12 of 28

paullimapa
Mentor
Mentor

Please share your drawing that contains these title blocks. This way I can test it on my end. Hopefully they are blocks and positioned perfectly next to each other in Model tab. If they are even off by a little bit the sorting in x or y direction base on their insert points will fail. 

Also I know horizontally you want to sort from left to right. But since you have two rows how about vertically ? Do you want to print top row first to bottom or bottom row first?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 13 of 28

Gaganpatel
Collaborator
Collaborator

Dear Sir,

 

Thank you very much for replay.

 

Please see the sample drawing .

0 Likes
Message 14 of 28

paullimapa
Mentor
Mentor

And what about sorting top to bottom or bottom to top?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 15 of 28

Gaganpatel
Collaborator
Collaborator

Dear Sir,

 

Shorting Top to Bottom.

 

Please see the revised sample drawing.

0 Likes
Message 16 of 28

Gaganpatel
Collaborator
Collaborator

Dear Sir,

 

Please help me

0 Likes
Message 17 of 28

paullimapa
Mentor
Mentor

working on print sort order...hopefully get back later today 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 18 of 28

paullimapa
Mentor
Mentor

Ok, give CSPlotSS.lsp a try

It's currently setup to plot all your title block SS as separate pdfs using: the following settings:

Device: DWG TO PDF.PC3
Paper Size: ISO full bleed A4 (297.00 x 210.00 MM)
Plotstyle: Monochrome.ctb
Scale: Fit

Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 19 of 28

Gaganpatel
Collaborator
Collaborator

Dear Sir,

Thank you for reply 🙏🙏

My requirement plot to printer 

Lisp file not working in autocad 2013 .

0 Likes
Message 20 of 28

paullimapa
Mentor
Mentor

I know the lisp code runs perfectly from 2020 and up to 2024.

Unfortunately I do not have that old of a version to test what happens in 2013

But I believe even in that older AutoCAD there should be a printer called: Dwg To Pdf.pc3 which is what the lisp code uses. TO check at the command prompt enter: PLOTTERMANAGER

Windows Explore should open showing you a list of pc3 files.

Do a screen capture and share all the printers listed

Also at AutoCAD 2013 command prompt go through the PLOT sequence starting with this:

-PLOT

go through all the prompts and then hit the F2 keep to bring up the TEXT screen & do a screen capture of the entire PLOT sequence of commands so I can see.

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes