AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

Do you know that you can automate the creation of DWF files using VBA?
The following code listing provides an example of how to create a DWF file using VBA :

'CODING STARTS HERE
Sub test()

Dim objDoc As AutoCAD.AcadDocument
Set objDoc = Documents.Open("C:\AutoCAD 2000\sample\colorwh.dwg")
Set objPlot = objDoc.Plot
Dim blnRet As Boolean
blnRet = objPlot.PlotToFile("c:\temp\temp.dwf",
"C:\AutoCAD 2000\plotters\DWF ePlot.pc3")
'Replace C:\AutoCAD 2000 with the location of acad.exe
'blnRet should be True if the plot is successful
objDoc.Close False
End Sub
'CODING ENDS HERE

The AutoLisp/Visual Lisp/VBA Resource Website

Copyright © 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website