Jump to content

How to batch plot when title block is not always in the same location?


vernonlee

Recommended Posts

My office drawings, the title block (paperspace) somehow is not always in the same location hence most of the time i cannot batch plot or use script pro & need to open them 1 by 1 & print them individually.

 

Can someone come up with a solution, lisp or script, such that it will auto select the extreme corner of any object base on the extreme lower left corner in the drawing with a fixed window plot area (A1 size [but able to adjust the size in the code])

 

I am thinking proberly this lisp or script would save users time when printing large batch of drawings with title block that is all over the drawings

 

Thanks

Link to comment
Share on other sites

  • Replies 31
  • Created
  • Last Reply

Top Posters In This Topic

  • vernonlee

    16

  • RobDraw

    6

  • BIGAL

    5

  • Wesley_Amsterdam

    3

Thanks for the tip on 'extents'. I tried it on a script & it works.

 

But now there is another issue as the titleblock created by the office has 2 corner & is in layer 0 which appear at top right & bottom corner which will get printed as the 'extents' is another 2 corner lines (in defpoint).

 

Any solution?

Link to comment
Share on other sites

Possible to have a script or lisp that can base on the 'extents' of the drawing (paperspace), but then offset plot area smaller by 20mm?

Link to comment
Share on other sites

titleblock.dwg

 

Attached is the sample.

 

Thanks

 

Sometimes i am asked to print A2 size from this A0 size drawing as well.

 

This is the script i use after your 'extents' suggestion, which has the the 2 corner lines reflected in the printout.

 

^C^C-plot;Y;;TDS750;Oce A2 420x594 mm (Landscape);m;Landscape;N;E;F;C;Y;A3LIGHT;Y;N;N;N;N;N;;

 

PS: I am not allowed to change any of the office standards xref drawings

Link to comment
Share on other sites

If you print them to a pdf format, you can always plot them on an A2-size paper if you want.

 

 

Most of the time is hardcopy.

 

But regarding pdf format, how does it solve my the issue?

 

Thanks

Link to comment
Share on other sites

Here is what you want did for same reason of autoplotting and people move the title block. Also have a version somewhere that does same thing but by using title block

 

; moves all objects in pspace to 0,0 alignment
(PROMPT ".....now moving dwgs....")
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(vlax-for lay (vla-get-Layouts doc)
 (setq plotabs (cons (vla-get-name lay) plotabs))
)
(setq plottablist (acad_strlsort plotabs))
(setq len (length plottablist))
(setvar "osmode" 0)
(setq K 0)
(repeat len
 (setq name (nth K plottablist))
 (princ name)
 (if (/= name "Model")
   (progn
   (setvar "ctab" name)
   (command "zoom" "E")
   (setq minxy  (getvar "extmin"))
   (setq maxxy (getvar "extmax"))
   (SETQ X (car minxy))
   (SETQ y (cadr minxy))
   (SETQ Xx (car maxxy))
   (SETQ yx (cadr maxxy))
   (setq ang (angle minxy maxxy))
   (setq dist (/ (distance minxy maxxy) 2.0))
   (setq pt1 (polar minxy dist ang))
   (Command "zoom" "C" pt1 1000.0)
   (setq x (+ x 20.0))
   (setq y (+ y 20.0))
   (setq xy (list x y))
   (command "move" "w" minxy maxxy  "" xy "0,0")
   (command "zoom" "E")
   ) ;end progn
) ; end if
(setq K (+ K 1))
) ; end repeat
(princ)

Version 2

; moves all objects in pspace to 0,0 alignment
(PROMPT ".....now moving dwgs....")
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(vlax-for lay (vla-get-Layouts doc)
 (setq plotabs (cons (vla-get-name lay) plotabs))
)
(setq plottablist (acad_strlsort plotabs))
(setq len (length plottablist))
(setq oldsnap (getvar "osmode")) 
(setvar "osmode" 0)
(setq en (entsel "Pick Title Block:"))
(setq  ed (entget (car en)))
(setq K 0)
(repeat len
 (setq name (nth K plottablist))
 (princ name)
 (if (/= name "Model")
   (progn
   (setvar "ctab" name)
   (setq minxy  (getvar "extmin"))
   (setq maxxy (getvar "extmax"))
   (setq ss (ssget "_X" (list (cons 0 "INSERT")  (cons 410 name) (cons 2 (cdr (assoc 2 ed))) ) ))
   (setq n (sslength ss))
   (setq en (ssname ss 0))
   (setq xy (assoc 10 (entget en)))
 ; insertion pt   (setq xy (assoc 10 el)) 
   (setq xy (list (cadr xy)(caddr xy)))
   (command "move" "w" minxy maxxy  "" xy "0,0")
   (command "zoom" "E")
   ) ;end progn
) ; end if
(setq K (+ K 1))
(princ k)
(setq ss nil)
(setq xy nil)
) ; end repeat

(setvar "osmode" oldsnap)
(princ)

Link to comment
Share on other sites

Hi BIGAL,

 

Version 1 did nothing. No command appear.

 

Version 2 prompt me to select the titleblock but did not move it to 0,0

Link to comment
Share on other sites

I also tried wrote a script to off the defpoints layer before the plot script.

 

I can visually see the defpoint off then plotted. But somehow the extents plot area still include the defpoints even though it was off as the plot still show the corner that is in layer 0 & at the same location.

 

:(

Link to comment
Share on other sites

My office drawings, the title block (paperspace) somehow is not always in the same location hence most of the time i cannot batch plot or use script pro & need to open them 1 by 1 & print them individually.

 

Can someone come up with a solution, lisp or script, such that it will auto select the extreme corner of any object base on the extreme lower left corner in the drawing with a fixed window plot area (A1 size [but able to adjust the size in the code])

 

Sometimes i am asked to print A2 size from this A0 size drawing as well.

 

This is the script i use after your 'extents' suggestion, which has the the 2 corner lines reflected in the printout.

 

^C^C-plot;Y;;TDS750;Oce A2 420x594 mm  (Landscape);m;Landscape;N;E;F;C;Y;A3LIGHT;Y;N;N;N;N;N;;

PS: I am not allowed to change any of the office standards xref drawings

 

[ATTACH]52556[/ATTACH]

 

Attached is the sample.

 

 

 

I also tried wrote a script to off the defpoints layer before the plot script.

 

I can visually see the defpoint off then plotted. But somehow the extents plot area still include the defpoints even though it was off as the plot still show the corner that is in layer 0 & at the same location.

 

:(

 

 

Hopefully i can get a solution.

 

Thanks

Link to comment
Share on other sites

Publisher and good page set-ups will do this.

 

What do you mean? How do i go about it?

 

Please bear in mind I am only purely plotting. I am not allowed to save the drawings whatsoever.

 

Basically they will just come to me & said print from eg. 700 to 767.

 

That took me 3 hours to plot 67 A0 size drawings to A2 size Hardcopy. From 11am to 2pm

 

Pathatic :(

 

I need help seriously :cry:

Link to comment
Share on other sites

Do you know how to create page set-ups?

 

 

(I'm guessing that is a "No", since that is what the script is doing for you.)

 

 

Are you familiar with the PUBLISH command?

 

 

Get familiar with both of these and I'll let you know how to use these to do what you are asking.

Link to comment
Share on other sites

Do you know how to create page set-ups?

 

 

(I'm guessing that is a "No", since that is what the script is doing for you.)

 

 

Are you familiar with the PUBLISH command?

 

 

Get familiar with both of these and I'll let you know how to use these to do what you are asking.

 

 

Yes. I have used it before to batch plot when the drawing title block (drawings that i personally work on) are the same at 0,0.

 

The problem arises when the other series of drawings done by others are all over the place & i have to print them.

Link to comment
Share on other sites

Is this thread related to the new thread you created today?

 

If you want a layer to not be plotted/excluded from extents etc., you need to freeze it, not turn it off.

Link to comment
Share on other sites

As long as the page set-ups are properly set up, you can use publish and get the desired results. For example, if you can just go into the file, hit print, and have it come out correctly, you can use publisher for this purpose. Otherwise, you will have to import proper page set-ups from within publisher.

Link to comment
Share on other sites

As long as the page set-ups are properly set up, you can use publish and get the desired results. For example, if you can just go into the file, hit print, and have it come out correctly, you can use publisher for this purpose. Otherwise, you will have to import proper page set-ups from within publisher.

 

I understand. But the issue is

 

1) Titleblock is not in a fix location.

2) I am not allowed to change anything for the drawing.

3) Using "extents" for plot area almost work but titleblock has 2 corner & is in layer 0 which appear at top right & bottom corner which will get printed as the 'extents' is another 2 corner lines (in defpoint). See my attached drawing.

4) switching off the defpoint also do not work as the 2 corners can still be seen in the plot.

 

I have eariler attached a sample drawing showing the title block.

 

If there is a way to automate the printing without showing the 2 corners I am keen to know.

 

Thanks

Link to comment
Share on other sites

Is this thread related to the new thread you created today?

 

If you want a layer to not be plotted/excluded from extents etc., you need to freeze it, not turn it off.

 

Yes it it.

 

I tried freezing it instead & yes (thanks for the tip) it now seems better now without have a huge border. But the thing is the 2 corners in layer '0' is still reflected.

 

Anyway to reduce the actual 'extents' plot area base on the 'extents' plot area either by lisp/script or even autocad settings?

 

So meaning if the 'extents' plot area capture on the screen as 0,421, the actual 'extents' plot area will be 2,419?

 

Hope you understand what i mean.

 

Apologies for creating a 2nd thread but i wanted to find other solution as i am frustrated taking a long time to plot those drawings & there will be more in a way of adhoc. This delay affected my other work i am doing for my supervisor & was question why I took so long to do that job. My supervisor wasn't too happy about it. I did not feel good about it either.

 

Thanks

Link to comment
Share on other sites

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...