Saved page setup

Jason Peterson

Usenet Archive
Joined
Dec 16, 2003
Messages
10
Reaction score
0
Is there a way to determine via VLISP if a drawing has a saved page setup rather than the default page setup?

Jason
 
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,

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

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)) ) )
)
 
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.
 
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

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.
 

Member Recommended

Back
Top