A question that has crossed my desk a lot lately is how to create a multipage DWF file through VB/VBA programming. A single page DWF is simple to produce using the DWF plotter drivers inside AutoCAD or the free DWF printer driver, but the multipage DWF is a bit more complicated -- or is it?
Example Project Scope To demonstrate how to create the multipage DWF file, I will present a form to the user with a list of all the layouts in the current drawing (figure 1). The user can select which of the layouts to include in the final DWF file. I will need a Userform with a ListBox and a CommandButton. The final version of the code that can be downloaded will include more material, but this is enough to demonstrate the functionality. I will leave all the default names for the controls, but I will set the ListBox to use checkboxes and enable multiple selections:
DWF Background Information The DWF file format is just a compressed archive file similar to a ZIP file. If you have a DWF file handy, make a copy and rename its extension to .zip. When you try opening it using your ZIP software, you should see a series of folders and files within the ZIP, which consist of XML data structures, PNG graphics and Meta data information.
|