PlotToFile  example

This example plots the current drawing to a file.

Sub Example_Plot()
    Dim oPlot As AcadPlot: Set oPlot = ThisDrawing.Plot
    Dim sPlotFileName As String: sPlotFileName = "c:MyPlot01.plt"
    Dim bPlotOk As Boolean: bPlotOk = oPlot.PlotToFile(sPlotFileName)
    MsgBox (IIf(bPlotOk, "Plot succeeded", "Plot failed"))
End Sub

This example plots the current drawing to a file while using a named plot configuration.

Sub Example_Plot02()    
    Dim oPlot As AcadPlot: Set oPlot = ThisDrawing.Plot
    Dim sPlotFileName As String: sPlotFileName = "c:MyPlot01.plt"
    Dim bPlotOk As Boolean
    bPlotOk = oPlot.PlotToFile(sPlotFileName, "Adobe_PDF.pc3")
    MsgBox (IIf(bPlotOk, "Plot succeeded", "Plot failed"))
End Sub

© Bricsys NV. All rights reserved.