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

Saved page setup

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
109 Views, 4 Replies

Saved page setup

Is there a way to determine via VLISP if a drawing has a saved page setup rather than the default page setup? Jason
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

Yes there is. Try the following, if it returns NIL then there are no saved pagesetups. ; [document] - document object ; return: list of strings or nil ; example: ; (getPlotConfigNames (vla-get-activedocument (vlax-get-acad-object))) (defun getPlotConfigNames (document / names) (reverse (vlax-for x (vla-get-plotconfigurations document) (setq names (cons (vla-get-name x) names)) ) ) ) -- -Jason Member of the Autodesk Discussion Forum Moderator Program "Jason Peterson" wrote in message news:3fdf5c40_3@statler... > Is there a way to determine via VLISP if a drawing has a saved page setup > rather than the default page setup? > > Jason > >
Message 3 of 5
Anonymous
in reply to: Anonymous

Jason, Thanks for the quick response. Do you know, is there also a way to simply see if a paperspace layout has a saved page setup that is not necessarily a named page setup? Also, do you know where the vla-get functions are documented? I can't seem to find it. Jason "Jason Piercey" wrote in message news:3fdf62f0$1_5@statler... Yes there is. Try the following, if it returns NIL then there are no saved pagesetups. ; [document] - document object ; return: list of strings or nil ; example: ; (getPlotConfigNames (vla-get-activedocument (vlax-get-acad-object))) (defun getPlotConfigNames (document / names) (reverse (vlax-for x (vla-get-plotconfigurations document) (setq names (cons (vla-get-name x) names)) ) ) ) -- -Jason Member of the Autodesk Discussion Forum Moderator Program "Jason Peterson" wrote in message news:3fdf5c40_3@statler... > Is there a way to determine via VLISP if a drawing has a saved page setup > rather than the default page setup? > > Jason > >
Message 4 of 5
Anonymous
in reply to: Anonymous

Not sure I understand how a layout could have a pagesetup but not be named. Could you give an example of that? As for the vla* functions you will have to look at the ActiveX and VBA reference and translate them from VBA to LISP syntax. If you type in VLIDE at the command line, push the APROPOS button (looks like an A in a set of ( ) you can type in vla and it should list them. -- -Jason Member of the Autodesk Discussion Forum Moderator Program "Jason Peterson" wrote in message news:3fdf6e36$1_3@statler... > Jason, > > Thanks for the quick response. Do you know, is there also a way to simply > see if a paperspace layout has a saved page setup that is not necessarily a > named page setup? Also, do you know where the vla-get functions are > documented? I can't seem to find it. > > Jason
Message 5 of 5
Anonymous
in reply to: Anonymous

Thanks for the vla tip. Concerning the page setups issue, when a user does a PageSetup command while in a layout tab, sets the parameters, and hits OK, the print setup is saved with the layout tab. This may or may not be a named page setup in the drawing file. I need to know when they've actually saved a page setup versus AutoCAD using the default settings for a layout. I think you have me headed in the right direction though. Jason "Jason Piercey" wrote in message news:3fdf7950$1_3@statler... Not sure I understand how a layout could have a pagesetup but not be named. Could you give an example of that? As for the vla* functions you will have to look at the ActiveX and VBA reference and translate them from VBA to LISP syntax. If you type in VLIDE at the command line, push the APROPOS button (looks like an A in a set of ( ) you can type in vla and it should list them. -- -Jason Member of the Autodesk Discussion Forum Moderator Program "Jason Peterson" wrote in message news:3fdf6e36$1_3@statler... > Jason, > > Thanks for the quick response. Do you know, is there also a way to simply > see if a paperspace layout has a saved page setup that is not necessarily a > named page setup? Also, do you know where the vla-get functions are > documented? I can't seem to find it. > > Jason

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

Post to forums  

Autodesk Design & Make Report

”Boost