Jump to content
Maniac0

Need Help about Auto Printing

Recommended Posts

Maniac0

Hello everyone.

I have a model with lots of sheets in it. I want to print all of them in order but printing them manually by selecting every paper as print screen is waste of time.

I just want to speed up this progress. I read some other topics but coudn't understand what to do. I look some guides about ploting but coudn't find answers about my problems. At least someone can guide me to documents I have to look for auto printing those papers please? :)

PrintExample.dwg

Share this post


Link to post
Share on other sites
ReMark

I'm guessing all of your "sheets" are in model space because you don't know how to make use of layouts. Is that correct?

Share this post


Link to post
Share on other sites
Maniac0

Hello ReMark, yes unfortunately all my sheets are in one model space. 200 set(400 page total) and yes I didn't use layouts before :/

Share this post


Link to post
Share on other sites
ReMark

As I figured. There have been other threads posted with this exact same problem but off the top of my head I can't point you at any particular one. Try a search.

Share this post


Link to post
Share on other sites
Aftertouch

This will do the trick for your DWG.

 

VERY QUICK AND DIRTY CODE!!

 

(defun C:CADTUTOR ( / )
(setq ss (ssget "_X" (list (cons 410 "Model"))))
(sssetfirst nil ss)
(command "PEDIT" "M" "P" "" "Y" "" "J" "" "")

(setq ss (ssget "_X" (list (cons 8 "0")(cons 410 "Model"))))
(sssetfirst nil ss)
(command "PEDIT" "M" "P" "" "C" "")
(setq n 0)
(repeat (sslength ss)
	(setq ensel (ssname ss n))
	(setq ensellength (vlax-curve-getdistatparam ensel (vlax-curve-getendparam ensel)))
		(if (= (fix ensellength) 14100 )
			(setq newlist (cons ensel newlist))
		)
	(setq n (+ n 1))
)

(setq n 0)
(repeat (length newlist)
	(setq ensel (nth n newlist))
	(setq enlist (entget ensel))
	(setq lowerleft (cdr (assoc 10 enlist)))
	(setq upperright (cdr (nth 24 enlist)))
		(command "-PLOT" "Y" "" "DWG TO PDF" "A3" "M" "P" "N" "W" lowerleft upperright "F" "C" "Y" "" "Y" "" n "N" "Y")
	(setq n (+ n 1))
)
(princ)
)

Share this post


Link to post
Share on other sites
maratovich

No problem.

We print quickly and easily.

For batch printing from the model, there is a program:

https://www.kdmsoft.net/revers.html

Here is the image after processing, ready to print 40 pages :

Print.jpg

Edited by maratovich

Share this post


Link to post
Share on other sites
BIGAL

Here is another but the maratovich solution is a more universal rather than hard coded like this.

 

You will need to change the title block name and the sheet sizes

 

(PROMPT ".....PRINTING DRAWING TO plotter....")
(setq oldsnap (getvar "osmode"))
(setvar "osmode" 0)

(setq ss2 (ssget "x" '((0 . "INSERT")(2 . "Title 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

  (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 coded for 566 high
  (setq xymax (strcat (rtos xmax 2 1) "," (rtos ymax 2 1)))


 (COMMAND "-PLOT"  "Y"     "" "//PRxxxxx/Design-5100"
       "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)

 

It is feasible to create layout tabs moving the title block to a layout and using a mview of the objects still in model space. That would allow you to use Publish or in my case my own version of publish.

Edited by BIGAL

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×