Message 1 of 2
Plotting acWindow to PDF

Not applicable
11-26-2016
05:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello.
I've been trying to write some code in order to plot to PDF a window with manually given coordinates. I get an error "Invalid procedure call or argument" in the SetWindowToPlot function. Anybody's got a clue on that?
Thanks in advance
Sub plotPDF() Dim pt1(0 To 2), pt2(0 To 2) As Variant pt1(0) = 0.0 pt1(1) = 250.0 pt1(2) = 0 pt2(0) = 210.0 pt2(1) = 250.0 + 297.0 pt2(2) = 0.0 ThisDrawing.ActiveLayout.SetWindowToPlot pt1, pt2 ThisDrawing.ActiveLayout.GetWindowToPlot pt1, pt2 ThisDrawing.ActiveLayout.PlotType = acWindow ThisDrawing.ActiveLayout.ConfigName = "DWG to PDF.pc3" ThisDrawing.Plot.DisplayPlotPreview acFullPreview End Sub