While we're on the topic of programming, the DWF Technical Evangelist Team has some samples that are provided on an as-is basis. Other samples were provided by Autodesk discussion group participants. These samples sometimes take advantage of undocumented API calls that may change in future versions.
Create Your Own Application
This C# sample allows you to batch publish DWF files from AutoCAD 2007. It was developed by John Schmier.
This C++ sample from Archana Naik shows how to work with text strings using the DWF Toolkit.
This C# sample code demonstrates how to work with object nodes and collections. OBJECTNODES are available in the API of version 7.0. An interface named CONTENT has been introduced, and objects can be obtained from the CONTENT object.
This C++ sample code shows how to run through a DWF file, using the DWF Toolkit, to list the URLs in the DWF file.
This small piece of code shows how to read and unpack the entities contained in a 2D stream inside a DWF file.
This C++ sample was omitted from the DWF Toolkit 7.2.1 distribution. It will make its return in an upcoming toolkit release.
This C++ sample is an MFC application that allows a user to sketch simple primitives and then save a DWF file.
Embed DWF Files into Applications
This is an example of using hyperlinks in a web page to navigate to 3D views in a model.
- Change object Highlight Color.zip
These HTML pages show how to work with DWF files in frames.
- Linking 2D and 3D: dwf_materials_demo.zip
- Object Highlight Sample.zip
- People Finder Facilities Management
This ASP sample was presented by Brian Mathews and Brian Pene at Autodesk University 2005 and shows how to integrate floor plan DWF files with an employee database.
Integrate Our ActiveX Controls
This Visual Basic sample shows how to work with collections of the Autodesk DWF Viewer. It finds all of the URLs in a DWF file and lists them.
- DWF Batch Printer 1.8.zip
This sample includes the Visual Basic source code for a batch printing application.
This Visual Basic example demonstrates how to print in black and white.
This DLL facilitates the printing process from a VB application. Source for a sample C# program that uses the DLL is included. A newer version of the same DLL has been built with Visual Studio 2005: PrintUtil2.zip.
- VB6 SimplePrint PrintEX example.zip
This Visual Basic sample shows how to interface to the Print function of the Autodesk DWF Viewer. A similar example, SimplePrint PrintEx.zip was created by Senior QA Engineer, Anand Iyer.
This Visual Basic application shows how to transform points from screen to drawing coordinates.
This C++ sample code shows how to detect the presence of Autodesk DWF Viewer or Autodesk Design Review.
The ability to programmatically interface with the files and the applications that result are yet another way that DWF goes beyond the paper.