- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I've managed to (very badly) make changes to a page setup. However, they seem to only change the page setup and not carry through to the plot... I'm sure it's probably missing a simple step, but visual lisp is a bit foreign to me so i'm gessing a lot...
;; Get the current drawing
(setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))
;; Get the PlotConfigurations collection
(setq plotCfgs (vla-get-PlotConfigurations doc))
(setq plotCfg (vl-catch-all-apply 'vla-Item (list plotCfgs "DWG to PDF pc3")))
;initializing window to plot
(if (= (getvar "ctab") "A4")(vlax-invoke plotCfg 'SetWindowToPlot '(0.0 0.0) '(297.0 210.0)))
(if (= (getvar "ctab") "A3")(vlax-invoke plotCfg 'SetWindowToPlot '(0.0 0.0) '(420.0 297.0)))
(if (= (getvar "ctab") "A2")(vlax-invoke plotCfg 'SetWindowToPlot '(0.0 0.0) '(594.0 420.0)))
(if (= (getvar "ctab") "A1")(vlax-invoke plotCfg 'SetWindowToPlot '(0.0 0.0) '(841.0 594.0)))
(if (= (getvar "ctab") "A0")(vlax-invoke plotCfg 'SetWindowToPlot '(0.0 0.0) '(1189.0 841.0)))
(vla-put-PlotType plotCfg acWindow)
;Force landscape orientation
(vla-put-PlotRotation plotCfg ac0degrees)
;; Assign the page setup to the current layout (seems to save the changes...)
(vla-CopyFrom (vla-get-ActiveLayout doc) plotCfg)
The problem seems to be that all page setups that had previous "portait" orientation and showing "landscape" in the page setup, but when I try to plot, the page setup doesn't load this change (still shows portait)...
Hope this makes sense and someone can help...
Cheers.
Solved! Go to Solution.