Public Sub test() Dim pLayout As AcadLayout Dim minPnt(2) As Double Dim maxPnt(2) As Double Set pLayout = ThisDrawing.ActiveLayout minPnt(0) = 0: minPnt(1) = 0 maxPnt(0) = 200: maxPnt(1) = 100
Dim min_Pnt, max_Pnt As Variant min_Pnt = ThisDrawing.Utility.TranslateCoordinates(minPnt, 0, 3, False) max_Pnt = ThisDrawing.Utility.TranslateCoordinates(maxPnt, 0, 3, False) ReDim Preserve min_Pnt(0 To 1) ReDim Preserve max_Pnt(0 To 1)
pLayout.SetWindowToPlot min_Pnt, max_Pnt pLayout.PlotType = acWindow ThisDrawing.Plot.DisplayPlotPreview acFullPreview End Sub
|