AutoCAD 2010/2011/2012

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

insert page setup

261 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 Z230
Xeon 3.20Ghz
24GB of RAM
Nvidia GeForce GTX 760
*Expert Elite*
GrantsPirate
Posts: 1,640
Registered: ‎08-15-2008
Message 2 of 6 (247 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: 253
Registered: ‎04-29-2008
Message 3 of 6 (229 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 Z230
Xeon 3.20Ghz
24GB of RAM
Nvidia GeForce GTX 760
*Expert Elite*
GrantsPirate
Posts: 1,640
Registered: ‎08-15-2008
Message 4 of 6 (221 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: 253
Registered: ‎04-29-2008
Message 5 of 6 (213 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 Z230
Xeon 3.20Ghz
24GB of RAM
Nvidia GeForce GTX 760
Distinguished Contributor
jeff.whitney
Posts: 159
Registered: ‎03-05-2008
Message 6 of 6 (150 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!

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!