Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
CAD Forums
»
CAD General
»
Topic:
Page set up
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Page set up (Read 1470 times)
0 Members and 1 Guest are viewing this topic.
Nardino
Newt
Posts: 97
Page set up
«
on:
January 25, 2017, 03:11:38 PM »
Hello to all
I have a few hundred drawings that have 3 named page set ups. Does anybody know how create a lisp or script so that I can make current a certain page set up?
thanks
Logged
ChrisCarlson
Guest
Re: Page set up
«
Reply #1 on:
January 25, 2017, 04:08:32 PM »
Code - Auto/Visual Lisp:
[Select]
;;; Set a named page setup as current on current layout by avoiding command usage http://jtbworld.com/autocad-pagesetup-lsp
;;; (SetCurrentPageSetup <AcadDocument> <PageSetupName>)
;;; (SetCurrentPageSetup (vla-get-activedocument (vlax-get-acad-object)) "Setup2")
(
defun
SetCurrentPageSetup
(
doc pcname
/
layout PlotConfig
)
(
setq
doc
(
vla-get-activedocument
(
vlax-get-acad-object
)
)
)
(
setq
layout
(
vla-get-activelayout
doc
)
)
(
setq
PlotConfig
(
vl
-
catch
-
all
-
apply
'
vla-item
(
list
(
vla-get-PlotConfigurations
doc
)
pcname
)
)
)
(
if
(
not
(
vl-catch-all-error-p
PlotConfig
)
)
(
vla-copyfrom
layout PlotConfig
)
)
)
JTB wrote a pretty nifty page setup function, will be pretty straight forward in combining this with a script for batch processing.
Logged
Rob...
King Gator
Posts: 3824
Take a little time to stop and smell the roses.
Re: Page set up
«
Reply #2 on:
January 25, 2017, 05:12:56 PM »
If that doesn't work out for you, I might be able to dig one up from my archives for you.
Logged
CAD Tech
Nardino
Newt
Posts: 97
Re: Page set up
«
Reply #3 on:
January 26, 2017, 10:57:27 AM »
Thanks for the code. It saved a lot of time
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
CAD Forums
»
CAD General
»
Topic:
Page set up