Jump to content

Recommended Posts

Posted

Is there a way to invoke the publish command and have it plot only the layouts to a specific page setup?

 

The reason I ask is that I have a lot of fields on our title block and I want to run fieldupdate before plotting?

 

Thanks.

Posted

Did you check your FIELDEVAL setting and make sure bitcode 4 (update on plot) is on? This might save you some coding...

Posted

Thanks JRauch. I didn't know of its existence. I'll take a look. You are right. It could save me a lot of time.

Posted

Thanks again for that JRauch. That will make things easier alright. Can LISP be used to launch the Publish command and have the model tab excluded from the list of objects to plot?

Posted

I can actually do without my last request but does anyone have a LISP to set the Pagesetup to be the same across all layouts? I have a look in google but didn't get much help.

 

Thanks.

Posted

I found this code:

 

; load the routine with _APPLOAD
; start it by: (multi-pagesetup "mysetup" "myprinter")
; more info on www.cadforum.cz
;
(defun multi-pagesetup (name device / )
(foreach item (layoutlist); you may replace (leyoutlist) by '("Lay1" "Lay2" "Lay3")
(progn
 (setvar "ctab" item)
 (command "._-plot"
  "_N"   ;detailed configuration
  ""     ;default layout name
  name   ;page setup name
  device ;output device name
  "_N"   ;write the plot to a file
  "_Y"   ;save changes to layout
  "_N"   ;proceed with plot
 );command
);progn
);foreach
(princ "\nPagesetup Has Been Applied.")
(princ)
);defun

 

which I modified to get this.

 

; load the routine with _APPLOAD
; start it by: (multi-pagesetup "mysetup" "myprinter")
; more info on www.cadforum.cz
;
(defun c:multipagesetup ( / )
(foreach item (layoutlist); you may replace (leyoutlist) by '("Lay1" "Lay2" "Lay3")
(progn
 (setvar "ctab" item)
     (command "_.psetupin" (findfile "T:/Drawing Tools/Templates/CCC2009.dwt") "A1" "y")
);progn
);foreach
(princ "\nPagesetup Has Been Applied.")
(princ)
);defun 

 

It runs but it doesn'y apply the setup to all layouts. Could someone have a look please?

 

Thanks

Posted
(defun c:CSTP  ( / Adoc Layts clyt)
     (setq aDoc  (vla-get-activedocument (vlax-get-acad-object))
           Layts (vla-get-layouts aDoc)
           clyt  (vla-get-activelayout aDoc))
     (foreach
            itm  (vl-remove (vla-get-name clyt) (layoutlist))
           (vla-copyfrom (vla-item Layts itm) clyt)
           )
     (princ)
     )

Posted

Thanks pBe. Do I need to put the pagesetup name somewhere?

 

Or I am reading it right to say it will copy the setup from the current tab to the other tabs?

Posted

Or I am reading it right to say it will copy the setup from the current tab to the other tabs?

 

Correct. when you run the code it copies the setup form the current tab to the other layouts

Posted

Excellent stuff again pBe. Thanks.

Posted

I just ran across this same dilemma last week and found that routine from cadforum, and found that it didn't work. The other thing I found was the command "PSetupIn". Run it with (command ".-psetupin" "template location" "Template page setup") to insert a template page setup. I made a quick script of

(command ".-psetupin" "X:\\GPI CADD Settings\\New Drawing Template\\Plan Production\\Old MassDOT Title Block.dwt" "24x36 OcePW300")
(foreach lay (layoutlist)(setvar "CTAB" lay)(command "._-plot" "_N" "" "24x36 OcePW300" "MA1 - OcePW300.pc3" "_N" "_Y" "_N"))

and ran it through 330 layouts in about 10 minutes. Worked great.

Posted

You have 330 layouts in a single drawing????? Ah just saw your PC spec. Now it makes sense!!

Posted

They were actually in a few drawings, most had 20 layouts or so and one had 127 layouts. I started by using Autoscript by Caddig, but with other people in some of the files, it was just as easy to open the files myself when I got to it and run the script.

 

(And I forgot that my PC specs needed to be updated. ;))

Posted

One of my old routines: http://forums.augi.com/showthread.php?80461-Page-Setup-Manager

 

About the FieldEval setting: That helps, but be careful about nested fields, e.g. say you've got a field extracting an area, then another copying that text and concatenating it with something else. No matter what the FieldEval is set to you might find one updating correctly, but not the other. For this reason I try to steer clear of such fields, not always possible though!

Posted

Bigal, the link doesn't work!

Posted

Hi pBe, I am sticking with publish for printing hard copies of drawings. But for multi printing pdf's I need something else. I have tried the pdfexport facility but i think it leaves a lot to be desired really and I can't get it to print the drawing to scale properly.

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