Plotting acWindow to PDF

Plotting acWindow to PDF

Anonymous
Not applicable
1,221 Views
1 Reply
Message 1 of 2

Plotting acWindow to PDF

Anonymous
Not applicable

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
1,222 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Dim pt1(0 To 1) As Double
Dim pt2(0 To 1) As Double

 

pt1(0) = 0#
pt1(1) = 250#

pt2(0) = 210#
pt2(1) = 250# + 297#

0 Likes