Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Apply PageSetup

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
5439 Views, 3 Replies

Apply PageSetup

I hope this is not a repeated question. In AutoCAD 2002, how I can get the list of PageSetup(s) inside a drawing file and apply certain one to one or all layouts? Any help is appreciated. Thanks Samir
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

Here is one way to get the job done. ; Jason Piercey . May 16th, 2003 ; assign a pagesetup to a layout ; [document] - vla-object, layout object ; [layout] - string, layout name ; [setup] - string, pagesetup to assign ; return: T or nil ; example: (putPagesetup [document] [layout] [setup]) ; revised: July 27th, 2003 ; trimmed off the fat and used (vl-catch-all.....) (defun putPagesetup (document layout setup) (if (vl-catch-all-error-p (vl-catch-all-apply (function (lambda () (vla-copyfrom (vla-item (vla-get-layouts document) layout) (vla-item (vla-get-plotconfigurations document) setup) ) ) ) ) ) nil t ) ) To assign a pagesetup named "test" to all layouts defined in the current document. (setq *doc* (vla-get-activedocument (vlax-get-acad-object))) (foreach x (layoutlist) (putPagesetup *doc* x "test")) -- -Jason Member of the Autodesk Discussion Forum Moderator Program "Samir" wrote in message news:400d6cd8$1_3@newsprd01... > I hope this is not a repeated question. > > In AutoCAD 2002, how I can get the list of PageSetup(s) inside a drawing > file and apply certain one to one or all layouts? > Any help is appreciated. > > Thanks > Samir > >
Message 3 of 4
Anonymous
in reply to: Anonymous

Thanks Jason, It works great. Do you know of a similar way get it in VBA? I'm trying to display the available Pagesetup(s) into a dropdown list. Thank you, Samir "Jason Piercey" wrote in message news:<400d7c57$1_2@newsprd01>... > Here is one way to get the job done. > > ; Jason Piercey . May 16th, 2003 > ; assign a pagesetup to a layout > ; [document] - vla-object, layout object > ; [layout] - string, layout name > ; [setup] - string, pagesetup to assign > ; return: T or nil > ; example: (putPagesetup [document] [layout] [setup]) > ; revised: July 27th, 2003 > ; trimmed off the fat and used (vl-catch-all.....) > (defun putPagesetup (document layout setup) > (if > (vl-catch-all-error-p > (vl-catch-all-apply > (function > (lambda () > (vla-copyfrom > (vla-item (vla-get-layouts document) layout) > (vla-item (vla-get-plotconfigurations document) setup) > ) > ) > ) > ) > ) > nil > t > ) > ) > > To assign a pagesetup named "test" to all layouts defined > in the current document. > > (setq *doc* (vla-get-activedocument (vlax-get-acad-object))) (foreach > x (layoutlist) (putPagesetup *doc* x "test")) > > > > -- > > -Jason > Member of the Autodesk Discussion Forum Moderator Program > > > "Samir" wrote in message > news:400d6cd8$1_3@newsprd01... > > I hope this is not a repeated question. > > > > In AutoCAD 2002, how I can get the list of PageSetup(s) inside a > > drawing file and apply certain one to one or all layouts? Any help > > is appreciated. > > > > Thanks > > Samir > >
Message 4 of 4
Anonymous
in reply to: Anonymous

Sorry, don't know a thing about VBA. You might try over in the VBA group... By NNTP discussion group reader at news://discussion.autodesk.com/autodesk.autocad.customization.vba By HTTP (web-based) interface at http://discussion.autodesk.com/forum.jspa?forumID=33 -- -Jason Member of the Autodesk Discussion Forum Moderator Program "Samir" wrote in message news:400daee1$1_3@newsprd01... > > > Thanks Jason, > > It works great. Do you know of a similar way get it in VBA? > > I'm trying to display the available Pagesetup(s) into a dropdown list. > > > > Thank you, > > Samir

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost