New Page Setup for Multiple Drawings
We have thousands of drawings that were created without a page setup being created. We also use these drawings for jobs where I have to print 100+ at a time. Is there a way or some script we can use to assign a page setup to a group of drawings (so I do not have to do it individually? I've seen how dwgconvert can modify a setup but these drawings have none to modify. Thanks in advance for your help.
Re: New Page Setup for Multiple Drawings
Take a look at Jimmy's page, has some resources to manage page setups.
https://jtbworld.com/autocad-pagesetup-lsp
Re: New Page Setup for Multiple Drawings
Quote:
Originally Posted by
BlackBox
Quote:
Originally Posted by
cadtag
You can define a pagesetup in model space that covers the conditions you want and save it in a drawing file. then (1) run the publish command and add all the files you want to include, and (2) remove the layout spaces. Use the named pagesetup as an override, rock and roll
This.
So long as all sheets are already orientated correctly, simply save the named page setup to one (
the first?) sheet, and then publish the plan set, applying the named page setup to all sheets prior to publish. In newer versions (
2009+?) applying the named page setup of one Document to others via publish dialog programmatically imports the named page setup for the purposes of the publish process (
not actually saved in the myriad Documents themselves).
Separately, if you do find the need to programmatically apply a specific named page setup as active, you might consider the
vla-SetActivePageSetup (
a custom .NET LispFunction Method, which expands the LISP API).
<Meaningless text so I can make this post>
Re: New Page Setup for Multiple Drawings
You can import a Page Setup with the PSETUPIN (Command) in a macro or using lisp like Jimmy Bergmark's mentioned before or Lee Mac's Steal from Drawing which allows you to import almost anything from another drawing.
Re: New Page Setup for Multiple Drawings
I've used scriptpro for this before, which can be found here:
https://www.autodesk.com/support/tec...4qzy2Ddi9.html
And I wrote a script to use the -psetupin command to bring the page setup to the drawing.
Save the following in a notepad file as yourscriptname.scr:
Code:
expert 2
filedia 0
-psetupin "G:\DRAWINGS\DISTRIB\CMW\PageSetupOverrides\PageSetupOverrides_Std.dwt" "11x17_Printer"
filedia 1
expert 0
qsave
exit
Change the path , filename, and layout name to yours of course, and then load it up in scriptpro and select the files you want to run it on. It will take awhile, but if I have a bunch like that to do, I usually just get it started before I leave for the night or weekend, lock my workstation, and let it run while I'm not there. If the script fails on a file, scriptpro lets you know, and gives you the option to re-run the failed files.
Re: New Page Setup for Multiple Drawings
PUBLISH Command & ScriptPro plot the drawings in series (one-at-a-time), where plotting via Core Console can do so in parallel (10-20-30-more? at once, depending on the system resource your workstation has) which exponentially reduces plot times.
Unfortunately, PSETUPIN Command doesn't set the Page Setup current, which is why vla-SetActivePageSetup was created... Since it's done in .NET, it also works in Core Console, ObjectDBX, etc.
Re: New Page Setup for Multiple Drawings
Quote:
Originally Posted by
BlackBox
PUBLISH Command & ScriptPro plot the drawings in series (one-at-a-time), where plotting via Core Console can do so in parallel (10-20-30-more? at once, depending on the system resource your workstation has) which exponentially reduces plot times.
Unfortunately, PSETUPIN Command doesn't set the Page Setup current, which is why vla-SetActivePageSetup was created... Since it's done in .NET, it also works in Core Console, ObjectDBX, etc.
A named page setup can be saved as part of the plot command when the page setup is added to the drawing using DWGCONVERT command. Substitute your Source Drawing, Page Setup, and Printer values shown in red. This script applies to the Model layout.
SavePageSetUp-A0-PDF-Limits.scr:
Code:
filedia 0
cmddia 0
(command "-psetupin" "C:/autocad/!frames/!PageSetup/A0-PDF-Limits.dwg" "A0-PDF-Limits" "y")
-PLOT
No
Model
A0-PDF-Limits
DocuCom PDF Driver.pc3
No
Yes
No
filedia 1
cmddia 1
qsave
close
Yes
Re: New Page Setup for Multiple Drawings
Quote:
Originally Posted by
remenda
A named page setup can be saved as part of the plot command when the page setup is added to the drawing using DWGCONVERT command. Substitute your Source Drawing, Page Setup, and Printer values shown in red. This script applies to the Model layout.
SavePageSetUp-A0-PDF-Limits.scr:
Code:
filedia 0
cmddia 0
(command "-psetupin" "C:/autocad/!frames/!PageSetup/A0-PDF-Limits.dwg" "A0-PDF-Limits" "y")
-PLOT
No
Model
A0-PDF-Limits
DocuCom PDF Driver.pc3
No
Yes
No
filedia 1
cmddia 1
qsave
close
Yes
I'm aware... and it's still not as efficient at setting a named Page Setup current to all Layouts as this:
Quote:
Originally Posted by
BlackBox
<snip>
Example
Code:
(foreach layoutname (layoutlist)
(vla-SetActivePageSetup layoutname “YourPageSetupName”)
)
<snip>