AutoLISP: Print All Layout Tabs

Here is a simple routine that should help plot all of the layout tabs in a drawing.

Note: This routine will print all of the layouts with the same setups -so this is a limitation and shouldn’t be applied to drawings that have layout tabs with various sizes and or orientation (Landscape and Portrait).

Last tested and used with AutoCAD 2011.

~Greg


;; Prints All Layout Tabs and names the new PDFs with the name of the
;; drawing followed by the layout tab name.
;;
;; Adjust the paper size and .ctb file as needed.
;;
;; The PDFs will be placed in the folder where the drawing resides
;;
(defun c:PA ()
(foreach lay (layoutlist)
  (setvar 'CTab lay)
  (COMMAND 	"-PLOT"
		"Y"
		""
		"DWG To PDF.pc3"
		"ANSI full bleed A (8.50 x 11.00 Inches)"
		"Inches"
		"PORTRAIT"
		"N"
		"E"
		"f"
		"C"
		"Y"
		"monochrome.ctb"
		"Y"
		"N"
		"N"
		"N"
		""; Name of file
		"N"
		"y"      )
    )
)
About these ads

About AutoCAD Tips

As weird as it sounds, AutoCAD is a hobby for me. But I am fortunate enough to have a career doing my hobby. I work for a large engineering firm supporting CAD users in various disciplines. My dream job would be to work for a company like Autodesk or Disney's Imagineering where inspiring others and using innovative approaches and software are adding value to projects and bringing design in all areas up to a new level. This blog serves as a repository or knowledge base for myself so that I can reference tips & tricks that I have learned and also refer others to it as well. I hope that this blog helps you learn at least one tip to make your drafting experience better.
This entry was posted in AutoLISP, Printing - Plotting. Bookmark the permalink.

One Response to AutoLISP: Print All Layout Tabs

  1. lalit Bisht says:

    Its Very Nice Script its Helps me in my Autocad Training
    Thanks for Sharing it

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s