AutoCAD 2010/2011/2012

Reply
Mentor
mikepo
Posts: 238
Registered: ‎04-29-2008
Message 1 of 6 (258 Views)

insert page setup

258 Views, 5 Replies
11-16-2011 01:47 PM

Does anyone have a LISP routine or know of a way to make a named page setup current in a drawing without using the dialog box?

You used to be able to access page setup from the command line, but it appears they've taken that away.

I want to create a custom button that makes a specific page setup current.

Mike Porter
www.ppeng.com
Civil3D 2014 SP2
Win 7 Professional - 64-bit
HP Z400
Xeon W3550 @ 3.07Ghz
24GB of RAM
Nvidia GeForce GTX 760
*Expert Elite*
GrantsPirate
Posts: 1,588
Registered: ‎08-15-2008
Message 2 of 6 (244 Views)

Re: insert page setup

11-16-2011 06:35 PM in reply to: mikepo

Let me google that for you....

http://www.jtbworld.com/lisp/pagesetup.htm

----------------------------------------------------------------------------
If something I wrote can be interpreted two ways, and one of the ways makes you sad or angry, I meant the other one.
Mentor
mikepo
Posts: 238
Registered: ‎04-29-2008
Message 3 of 6 (226 Views)

Re: insert page setup

11-17-2011 07:44 AM in reply to: GrantsPirate

I found that page after I posted and it looked like it had what I needed, but I can't figure out how to make it work.

I'm not a LISP expert, but I can muddle through some things.

In that LISP file, does the bracketed text need to be edited per the users requirements?

 

Thanks for the reply

Mike Porter
www.ppeng.com
Civil3D 2014 SP2
Win 7 Professional - 64-bit
HP Z400
Xeon W3550 @ 3.07Ghz
24GB of RAM
Nvidia GeForce GTX 760
*Expert Elite*
GrantsPirate
Posts: 1,588
Registered: ‎08-15-2008
Message 4 of 6 (218 Views)

Re: insert page setup

11-17-2011 11:54 AM in reply to: mikepo

Sorry, I didn't look at that one, seems overly complicated. Here is the one I use.

 

(defun C: pagesetup_import (/ exprt)
(setq exprt (getvar "EXPERT"))
(setvar "EXPERT" 2)
(command ".-psetupin" "C:\\Users\\mikepo\\appData\\Local\\Autodesk\\AutoCAD 2012\\R18.2\\enu\\Template\\36X24TEMPLATE.dwt" "*")
(setvar "expert" exprt)
)
(PRINC)

 

Edit for your exact path and drawing file that holds your pagesetups.

----------------------------------------------------------------------------
If something I wrote can be interpreted two ways, and one of the ways makes you sad or angry, I meant the other one.
Mentor
mikepo
Posts: 238
Registered: ‎04-29-2008
Message 5 of 6 (210 Views)

Re: insert page setup

11-17-2011 12:27 PM in reply to: GrantsPirate

Wouldn't that routine import page setups from an outside file?

I'm trying to make a page setup current that is already in the drawing.

I think I can make this work:

(command "._plot" "_n" "layout name" "page setup name" "" "" "_y" "_n")

Mike Porter
www.ppeng.com
Civil3D 2014 SP2
Win 7 Professional - 64-bit
HP Z400
Xeon W3550 @ 3.07Ghz
24GB of RAM
Nvidia GeForce GTX 760
Distinguished Contributor
jeff.whitney
Posts: 140
Registered: ‎03-05-2008
Message 6 of 6 (147 Views)

Re: insert page setup

04-13-2012 02:07 PM in reply to: mikepo

That does work (THANK YOU!) but you need to replace the _plot iwth -plot (the - makes it non-idalogue).

 

Solved my problem too!

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.