Message 1 of 2
Set my Pagesetup "error"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
My pagesetup name = pdf.m-2021
not working !
; pdf.m-2021 - the Page Setup Name
; all - a flag, T for all nil for current layout
(defun SetNamePageSetupAllLayouts (pdf.m-2021 all / lst)
(or adoc (setq adoc (vla-get-ActiveDocument (vlax-get-acad-object))))
(if (vl-position
pdf.m-2021
(vlax-for pltcfg (vla-get-plotconfigurations adoc)
(setq lst (cons (vlax-get pltcfg 'pdf.m-2021) lst))
)
)
(progn
(vlax-for layt (vla-get-Layouts adoc)
(if (/= (vla-get-name layt) "Model")
(if all
(vla-copyfrom layt (vla-item (vla-get-PlotConfigurations adoc) pdf.m-2021))
(if (= (vla-get-name layt) (getvar 'ctab))
(vla-copyfrom layt (vla-item (vla-get-PlotConfigurations adoc) pdf.m-2021))
)
)
)
)
(vla-Regen adoc acActiveViewport)
)
)
)
; to change to MyPagesetup all layouts
(defun c:demo nil
(SetNamePageSetupAllLayouts "pdf.m-2021" T)
(princ)
)
; to change to MyPagesetup just the active layout
(defun c:demo1 nil
(SetNamePageSetupAllLayouts "pdf.m-2021" nil)
(princ)
)
"Save Energy"
Did you find this reply helpful? If so please use the Accept as Solution
Did you find this reply helpful? If so please use the Accept as Solution