current pagesetup in status bar

The Real JD

Usenet Archive
Joined
Jul 28, 2003
Messages
183
Reaction score
0
Can someone offer a way to show the current pagesetup of a drawing at the statusbar? I searched and haven't found anything yet. TIA
 
Suggestion:
Get the current pagesetup (as a string called cur_pagesetup) then (setvar "MODEMACRO" cur_pagesetup)

Bob
 
Sorry not clear on something.
is "cur_pagesetup" a system variable? Or are you suggesting to take the system variable and setq it to a string called cur_pagesetup ?
 
Okay, so i searched thru the system variables.
How do i retrieve the name of the current pagesetup?
 
I think something like:

(setq adoc (vla-get-activedocument (vlax-get-acad-object)) cur_pagesetup (vla-get-activelayout adoc)
)

Would set cur_pagesetup (string variable you can rename).
Then:
(setvar "MODEMACRO" cur_pagesetup)

Above may not be the exact item (page setup) you want.

Bob
 
Not sure if there is a direct route to the current
pagesetup via ActiveX but this should do the
trick for a vanilla version.

Use like this:
(getCurrentPagesetup (getvar "ctab"))

; [layout] - string, layout name
; returns current pagesetup of [layout] or nil
(defun getCurrentPagesetup (layout / lst data)
(setq lst (dictsearch (namedobjdict) "acad_layout"))
(setq lst (dictsearch (cdar lst) layout))
(setq lst (member '(100 . "AcDbPlotSettings") lst))
(setq data (cadr lst))
(if (and (= 1 (car data)) (/= "" (cdr data)) )
(cdr (assoc 1 lst)) )
)
 
Thanks Jason!
I'll give that a try... :-)

Jason Piercey said:
Not sure if there is a direct route to the current
pagesetup via ActiveX but this should do the
trick for a vanilla version.

Use like this:
(getCurrentPagesetup (getvar "ctab"))

; [layout] - string, layout name
; returns current pagesetup of [layout] or nil
(defun getCurrentPagesetup (layout / lst data)
(setq lst (dictsearch (namedobjdict) "acad_layout"))
(setq lst (dictsearch (cdar lst) layout))
(setq lst (member '(100 . "AcDbPlotSettings") lst))
(setq data (cadr lst))
(if (and (= 1 (car data)) (/= "" (cdr data)) )
(cdr (assoc 1 lst)) )
)

The real JD said:
How do i retrieve the name of the current pagesetup?
 
Back
Top