Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Output 100 pdf enlargements from modelspace?

10 REPLIES 10
Reply
Message 1 of 11
rob_gibson
622 Views, 10 Replies

Output 100 pdf enlargements from modelspace?

I have a drawing with ~100 objects that I'd like zoomed in pdf's of.

 

is there a non-manual way to either:

plot multiple windows from model space

create and plot multiple viewports on the same paper space sheet

create multiple sheets with viewports centred on specific x,y???

or any other ideas?....... 100 cookiecutter2's

 

thanks

Screenshot 2023-07-27 121922.png

10 REPLIES 10
Message 2 of 11
VincentSheehan
in reply to: rob_gibson

If you're into writing scripts, it can be done. Setup a view for each plot area then use the -plot command to write the script.

 

It also might be just as fast to create a layout for each plot area then use the publish command.

 

 

Vincent Sheehan

Sr. Civil Designer
Poly In 3D Blog

Message 3 of 11
rob_gibson
in reply to: VincentSheehan

this time I ended up creating multiple sheets manually and publishing them

 


@VincentSheehan wrote:

If you're into writing scripts, it can be done. Setup a view for each plot area then use the -plot command to write the script.

 

It also might be just as fast to create a layout for each plot area then use the publish command.

 

 


Do you mean set up named viewports then plot, display option?

Is there a way to define multiple viewports x,y position?

Message 4 of 11
Kent1Cooper
in reply to: rob_gibson

Are the objects you want to Zoom in on and plot the area around "findable" in some way, such as being Blocks of a certain name and/or on a certain Layer or something?  Or do they all have something like a label in Text on a certain Layer?  And would all Plots be at the same size/scale?  It would not be difficult to take a selection set of whatever is findable, step through it, and for each one, find the middle of it and calculate a window around that to use in a Plot command.  It could be done without needing to create Viewports, if the only reason you would be making those would be for Plotting purposes.

Kent Cooper, AIA
Message 5 of 11
rob_gibson
in reply to: Kent1Cooper

Hi,

The objects to plot could easily be findable. How about a Point on layer "print" in the centre of each intended plot areas?

I'd like all zoomed plots to be the same size and scale.

Any chance you could start me off with a lisp please? and i'll have a go at tuning it to suit

Message 6 of 11
rob_gibson
in reply to: rob_gibson

I found a lisp* and almost got it to do what I what.

But I cant make ssget select only text on layer "NoPrint"!!

and how could I name each PDF as the contents of the text it's centred on?

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plot-lisp/td-p/9933400

 

; simple plot windows in model
 ; By AlanH. errors by rob
(defun C:pwind(/ ss2 n xmin xmax xymin ymax ymin index en el inspt)
(setq ss2 (ssget '((0 . "TEXT"))));(410 . "NoPrint") text on layer NoPrint
(setq n (sslength ss2));needs no selection error?

(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) 2.5))
   (setq ymin (- (caddr inspt) 2.5))
   (setq xymin (strcat (rtos xmin 2 3) "," (rtos ymin 2 3)))

   (setq xmax (+ xmin 5))
   (setq ymax (+ ymin 5))
   (setq xymax (strcat (rtos xmax 2 3) "," (rtos ymax 2 3)))

  (COMMAND "-PLOT"
  			"Y";detailed
			"Model"
			"Dwg To Pdf"
			"ISO A4 (210.00 x 297.00 MM)"
			"M";Millimeters
			"P";Portrait
			"N";upside down
			"W";window
			xymin
			xymax
			"25=1";scale
			"C";centred
			"Y";plot styles
			"Acad.ctb"
			"Y";lineweights
			"A";shade plot settings
			" ";This saves the plot file to DWG path?
			index ;name????
			"N";save changes to settings
			"y"	

    )
   
  (setq index (+ index 1))

)

(princ)
)
Message 7 of 11
Kent1Cooper
in reply to: rob_gibson


@rob_gibson wrote:

.... I cant make ssget select only text on layer "NoPrint"!! ....

....
(setq ss2 (ssget '((0 . "TEXT"))));(410 . "NoPrint") text on layer NoPrint
....

The DXF code number for the LayER entry is 8, not 410 [that's the LayOUT].

Kent Cooper, AIA
Message 8 of 11
Kent1Cooper
in reply to: rob_gibson


@rob_gibson wrote:

.... how could I name each PDF as the contents of the text it's centred on?

....
			" ";This saves the plot file to DWG path?
			index ;name????
....

I think you need to put a combined filepath and name into one entry in place of those two lines.  If you want it in the current drawing's folder location, presumably:
(strcat (getvar 'dwgprefix) (cdr (assoc 1 el)))

Kent Cooper, AIA
Message 9 of 11
rob_gibson
in reply to: Kent1Cooper

very good, works of course, but why cdr?

(strcat (getvar 'dwgprefix) (cdr (assoc 1 el)))

(seems to work without)

Message 10 of 11
Kent1Cooper
in reply to: rob_gibson


@rob_gibson wrote:

very good, works of course, but why cdr?

(strcat (getvar 'dwgprefix) (cdr (assoc 1 el)))

(seems to work without)


Does it?  If I eliminate that function, I get [as expected]:

 

Command: (strcat (getvar 'dwgprefix) (assoc 1 el))
; error: bad argument type: stringp (1 . "test")

 

That's because (assoc 1 el) returns that dotted-pair list of a 1 with the text content, not a text string that (strcat) is looking for.  The (cdr) function extracts the desired text string from the dotted-pair list.

 

Even if I remove only your pink part, and leave its parentheses, it still [as also expected] doesn't work:

 

Command: (strcat (getvar 'dwgprefix) ((assoc 1 el)))
; error: bad function: (1 . "test")

 

Kent Cooper, AIA
Message 11 of 11
rob_gibson
in reply to: rob_gibson

It seemed to work without the cdr function! but then broke

cheers for the explanation

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report