VBA로 출력시에 A3로 설정을 해도 용지가 무조건 A4(기본용지)로
출력되는데 …. 이유가 뭘까요?? 뭐가 잘못된건지…..
고수분들의 도움 부탁합니다.
Sub Plot_Bk2()
Dim newValue(0 To 1) As Double
Dim ACADLayout As ACADLayout
Dim ACADPref As AcadPreferencesFiles
Dim originalValue As Variant
Dim MaxPt As Variant
Dim MinPt As Variant
Set ACADLayout = ThisDrawing.Layouts(“Model”)
MinPt = ThisDrawing.Utility.GetPoint(, “Click the lower-left of the window to plot.”)
MaxPt = ThisDrawing.Utility.GetPoint(, “Click the lower-left of the window to plot.”)
ACADLayout.RefreshPlotDeviceInfo
ACADLayout.ConfigName = “\clp2179hp”
ACADLayout.StyleSheet = “dd.ctb”
ACADLayout.CanonicalMediaName = “A3”
ACADLayout.PaperUnits = acMillimeters
ACADLayout.SetCustomScale 1, (MaxPt(1) – MinPt(1)) / 594 * 2
newValue(0) = 0
newValue(1) = 0
ACADLayout.PlotOrigin = newValue
ReDim Preserve MaxPt(0 To 1)
ReDim Preserve MinPt(0 To 1)
ACADLayout.SetWindowToPlot MinPt, MaxPt
ACADLayout.GetWindowToPlot MinPt, MaxPt
ACADLayout.PlotType = acWindow
ThisDrawing.Plot.NumberOfCopies = 1
ThisDrawing.Plot.PlotToDevice “\clp2179hp”
End Sub