Hi guys,
I try to create pdf from layout based on two points (window area), I found a LeeMac's codes on a topic. It works correct but the exported pdf is blank while coordinate is correct and when I set window manually from plot dialoge the problem is solved.
(setq acdoc (vla-get-activedocument (vlax-get-acad-object))
cplot (vla-get-activelayout acdoc)
acplt (vla-get-plot acdoc)
)
(setq dev (vla-get-ConfigName cplot))
(setq pf1 '(0.0 68.75))
(setq pf2 '(47.5 0.0))
(vla-put-plottype cplot acwindow)
(vlax-invoke
cplot
'setwindowtoplot
pf1
pf2
)
(vla-put-CenterPlot cplot 1)
(vla-PlotToFile
(vla-get-Plot acdoc)
(strcat (getvar "dwgprefix")
"test"
".pdf"
)
)
Can someone tell me what the problem is with the codes ?