Message 1 of 5

Not applicable
10-15-2019
10:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to rotate a drawing that is suppose to be plotted on ANSI_full_bleed_D_(34.00_x_22.00_Inches). The current code works, except that it keeps plotting on a portrait landscape. I have tried the .PlotRotation = ac90degrees command but with no luck.
Private Sub PlotToPdf(CurrentCADfile As AcadDocument, pdfFile As String) Dim ACADLayout As ACADLayout 'Create a new plot configuration with all needed parameters ' Set ptObj = dwg.Plot ' Set ptConfigs = dwg.PlotConfigurations Set ACADLayout = CurrentCADfile.ModelSpace.Layout ACADLayout.StyleSheet = "monochrome.ctb" 'Print in Black and White ACADLayout.PlotRotation = ac90degrees ' " landscape" 'Not working ACADLayout.ConfigName = "DWG To PDF.pc3" 'Using this printer ACADLayout.CanonicalMediaName = "ANSI_full_bleed_D_(34.00_x_22.00_Inches)" 'PDF format using this size ACADLayout.StandardScale = acScaleToFit ACADLayout.PlotType = acExtents 'If your drawing has no objects, ZoomExtents displays the drawing limits ACADLayout.CenterPlot = True 'Center the plot Set currentplot = CurrentCADfile.Plot ''Convertion step currentplot.PlotToFile pdfFile 'Plots to a file. PlotToDevice - Plots to a plotter or printer. ' currentplot.DisplayPlotPreview ' ThisDrawing.SetVariable "BACKGROUNDPLOT", 0 ' ThisDrawing.SetVariable "BACKGROUNDPLOT", backPlot ' Debug.Print pdfFile ' If currentplot.Plot.PlotToDevice Then ' MsgBox "Layouts successfully plotted." 'Acad Quit here ' End If End Sub
Solved! Go to Solution.