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
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?