Page 1 of 1

Export DWG to PDF

Posted: Tue Jan 31, 2023 6:20 am
by Caldlaser
Hi,

Anyone has a peace of code that export a dwg file to a pdf file, I came of a AutoCad world, I tryed to adapte to a VBA code to Intellicad but It donĀ“t work

Re: Export DWG to PDF

Posted: Tue Jan 31, 2023 8:58 pm
by QuanNguyen
Please refer the little snip code:

Code: Select all

Private Sub PlotToPdf()
    Dim Layout As Layout
    Set Layout = ActiveDocument.ActiveLayout
    Layout.RefreshPlotDeviceInfo
    Layout.ConfigName = "Microsoft Print to PDF"    ' PLOTTER
    Layout.PlotType = vicWindow
    Layout.PlotRotation = 0
    Layout.StyleSheet = "icad.ctb"
'    Layout.PlotWithPlotStyles = True
'    Layout.PlotViewportBorders = False
'    Layout.PlotViewportsFirst = True
    Layout.CanonicalMediaName = "A4"     ' SIZE
'    Layout.PaperUnits = vicInches
'    Layout.StandardScale = vic1_16i    ' SCALE
'    Layout.ShowPlotStyles = False
'    Layout.CenterPlot = True
'    Layout.ScaleLineweights = False
    Layout.RefreshPlotDeviceInfo

    IntelliCAD.PlotManager.SetWindow 0, 0, 10, 10
    
    ActiveDocument.PrintDrawing

End Sub

Re: Export DWG to PDF

Posted: Tue Apr 09, 2024 7:20 am
by gluz
Hello,

Is there a way to export PDF in silent mode?

I would like the window not to appear and the "model" option to be configured.

PlotPdf.png
PlotPdf.png (28.63 KiB) Viewed 473 times