I. Introduction
- The DWF Toolkit 7.3 includes C++ source code for reading and writing DWF files.
- More specifically, this version of the DWF Toolkit provides APIs for:
- reading and writing 3D DWF from any application,
- simplified 2D interfaces,
- reading and writing composite DWF files (3D and 2D combined), and
- cross-platform support (Windows, Mac, Linux).
- This version of the toolkit handles DWF files generated by AutoCAD 2008 (not yet released), Inventor R12, and other Autodesk design software applications.
II. Audience
- If you are a Visual Basic or JavaScript programmer interested in working with the API associated with the Autodesk DWF Viewer and Autodesk Design Review, then you should visit the Autodesk Developer Center. There is a compiled HTML help file that describes that interface.
- The DWF Toolkit is intended for hardcore C++ programmers who wish to build their own applications.
III. Contents
Though this download is referred to as the "DWF Toolkit" to reference its all encompassing name, the package actually consists of four toolkits:
- DWF Core - toolkit that provides platform independence. This includes base items like strings and operations like file i/o.
- DWF Toolkit - toolkit that handles DWF files as packages. This includes XML used to describe the contents.
- WHIP Toolkit - toolkit that handles 2D streams
- W3D Toolkit - toolkit that handles 3D streams
IV. Documentation
- Main DWF Toolkit Documentation Home Page
- DWF Toolkit Component C++ Libraries
- DWF Core Library API
- DWF Toolkit: File Processing/Publishing
- DWF Package API
- DWF Publisher API
- DWF Toolkit: Streams
- Whip 2D Graphics API
- DWF 3D Graphics API
- Format Specifications
- DWF File Format
- Whip 2D Stream Format
- W3D Stream Format
- Code Samples/Examples
V. Support
- When downloaded from the Autodesk web site, the DWF Toolkit is provided on an as-is basis. There is no direct support from Autodesk.
- Peer to peer support is available in the Autodesk DWF discussion group.
http://discussion.autodesk.com/forum.jspa?forumID=114
news://discussion.autodesk.com/autodesk.dwf - Additional information is available in the "DWF Programming" category of Beyond the Paper DWF Blog. A list of samples appears as a posting to the blog.
VI. Structure
The directory structure for the DWF Toolkit is divided into various sections.
Section | Directories | Description |
---|---|---|
Build | develop\global\build\gnu\dwfcore develop\global\build\gnu\dwftoolkit develop\global\build\VC 7.0\DWFCore develop\global\build\VC 7.0\DWFToolkit develop\global\build\VC 7.0\W3DToolkit develop\global\build\VC 7.0\WhipToolkit develop\global\build\VC 7.1\DWFCore develop\global\build\VC 7.1\DWFToolkit develop\global\build\VC 7.1\W3DToolkit develop\global\build\VC 7.1\WhipToolkit develop\global\build\VC 8.0\DWFCore develop\global\build\VC 8.0\DWFToolkit develop\global\build\VC 8.0\W3DToolkit develop\global\build\VC 8.0\WhipToolkit develop\global\build\XCode2.1\DWFCore\DWFCore.xcode develop\global\build\XCode2.1\DWFCore\English.lproj develop\global\build\XCode2.1\DWFToolkit\DWFToolkit.xcode develop\global\build\XCode2.1\DWFToolkit\English.lproj |
These are the solution, project, and make files for the various compiler versions. |
Resources | develop\global\rc\core develop\global\rc\dwf\w3dtk develop\global\rc\dwf\whiptk |
These are the resource files for the Microsoft compilers. |
Source | develop\global\src\dwf\expat develop\global\src\dwf\package\reader develop\global\src\dwf\package\utility develop\global\src\dwf\package\writer\extensions\6.0 develop\global\src\dwf\package\writer\extensions\6.01 develop\global\src\dwf\package\writer\extensions\6.11 develop\global\src\dwf\presentation\reader develop\global\src\dwf\presentation\utility develop\global\src\dwf\publisher\data develop\global\src\dwf\publisher\impl develop\global\src\dwf\publisher\model develop\global\src\dwf\publisher\plot develop\global\src\dwf\publisher\win32 develop\global\src\dwf\w3dtk\hoops develop\global\src\dwf\w3dtk\jpeg develop\global\src\dwf\w3dtk\utility develop\global\src\dwf\whiptk develop\global\src\dwfcore\ansi develop\global\src\dwfcore\crypto develop\global\src\dwfcore\digest develop\global\src\dwfcore\mac develop\global\src\dwfcore\win32 develop\global\src\dwfcore\x64 develop\global\src\dwfcore\x86 develop\global\src\dwfcore\zip develop\global\src\dwfcore\zlib develop\global\src\dwfopenenc develop\global\src\dwfopenenc\win32 |
These are the source files that comprise the four toolkits. |
Documentation | docs\DWF Core\html docs\DWF Toolkit\html docs\DWF Toolkit\Specification\dwfImages docs\DWF Toolkit\Specification\dwfSpec\DWF 6 Specification_files docs\DWF Toolkit\Specification\dwfSpec\EPlot Specification v1.2_files docs\DWF Toolkit\Specification\dwfSpec\schemas docs\DWF Toolkit\Specification\sharedHtml docs\DWF Toolkit\W3D\html docs\DWF Toolkit\W3D\Specification\HSFSpec docs\DWF Toolkit\W3D\Specification\HSFSpec\opcodes docs\DWF Toolkit\Whip2D\html docs\DWF Toolkit\Whip2D\Specification\sharedHtml docs\DWF Toolkit\Whip2D\Specification\whipHtml docs\DWF Toolkit\Whip2D\Specification\whipImages docs\DWF Toolkit\Whip2D\Specification\whipSpec\AppendixA docs\DWF Toolkit\Whip2D\Specification\whipSpec\Chapters docs\DWF Toolkit\Whip2D\Specification\whipSpec\Contents docs\DWF Toolkit\Whip2D\Specification\whipSpec\CoverPage docs\DWF Toolkit\Whip2D\Specification\whipSpec\Glossary docs\DWF Toolkit\Whip2D\Specification\whipSpec\Header docs\DWF Toolkit\Whip2D\Specification\whipSpec\License docs\DWF Toolkit\Whip2D\Specification\whipSpec\OpcodeRef docs\DWF Toolkit\Whip2D\Specification\whipSpec\Opcodes docs\DWF Toolkit\Whip2D\Specification\whipSpec\Overview docs\DWF Toolkit\Whip2D\Specification\whipSpec\Terms_Index docs\DWF Toolkit\Whip2D\Specification\whipSpec\WhatsNew docs\DWF Toolkit\Whip2D\Specification\whipSpec\WhipData |
The HTML directories contain descriptions of the C++ code. The Specification directories describe the format of the DWF file itself. If you use the C++ classes properly, you should never need to look at the specifications. |
Sample Programs | samples\DWFCore\Digest samples\DWFCore\Files samples\DWFCore\Strings samples\DWFCore\Threads samples\DWFCore\UUID samples\DWFCore\VariableZip samples\DWFCore\ZipDescriptor samples\DWFOpenEncryption\Crypto samples\DWFToolkit\3DPublish samples\DWFToolkit\Aggregate samples\DWFToolkit\GlobalSectionWriter samples\DWFToolkit\ObjectDefinitionReader samples\DWFToolkit\PublishMetadata samples\DWFToolkit\ReadContentDefinition samples\DWFToolkit\ReadSignedDWF samples\DWFToolkit\SignPublishedData samples\DWFToolkit\SimpleEPlotWriter samples\DWFToolkit\SimpleEnumReader samples\DWFToolkit\SimpleW3DStreamProcessor samples\DWFToolkit\TimedXMLReader samples\DWFToolkit\W2dTest samples\DWFToolkit\WhipExamples samples\DWFToolkit\WriteContent |
These sample programs provide examples of reading and writing DWF files. |
VII. Changes Since DWF Toolkit 7.2.1
A. Feature List
- Geo-referencing (DWF knows its longitude and latitude location)
- 3D user coordinate system
- Publisher API Enhancements (allow choices regarding passwords and compression)
- 64-bit operating system support
B. Feature Descriptions
Geo-referencing
- The Geo-referencing feature addresses two main requirements to:
- Capture the coordinate system that an ePlot section is defined in.
- Allow applications to convert DWF coordinates to latitude/longitude coordinates without the need for complicated transformations that require knowledge of various coordinate systems.
- The XML schema for publishing coordinate system information is based on the WKT string specified by OpenGIS for coordinate system exchange. The values for attributes are string constants as defined by in the OpenGIS specification. The following string constant is defined in the DWF Toolkit to tag a geographic coordinate system resource XML:
DWFXML::kzRole_GeographicCoordinateSystem = L"geographic coordinate system"
- The coordinate system resource must be published as a child of the graphics resource whose coordinate system is being described. Applications such as the DWF Viewer need to be able to convert model coordinate to latitude and longitude values. This can be done accurately if the Coordinate System description can be consumed. Alternatively, coverage data can be published with the sample points being the model coordinates and the coverage data being the corresponding latitude longitude values.
- The following string constant is defined in the DWF Toolkit to tag observation mesh resource XML:
DWFXML::kzRole_ObservationMesh = L"observation mesh"
3D User Coordinate System
- For an upcoming release of Autodesk DWF viewing applications, the concept of coordinate systems for eModel and ePlot sections is being introduced. This allows publishers to publish coordinate systems and for markup applications to add their coordinate systems. During publishing, coordinate systems are added to the primary graphic resource. When marking up, coordinate systems can be added to the markup graphic resource. As such, the DWFModel, DWFPlot, and DWFGraphicResource classes allow coordinate systems to be added or removed.
- A coordinate system is an origin and a rotation matrix. The coordinate system classes deal with the origin and rotation components individually, instead of a single transformation matrix to disallow scaling, shearing or other transformations. A 3-tuple origin and a 9-tuple rotation in row major configuration is used (in APIs and serialization).
- When using the publishing APIs, DWFModel and DWFPlot classes can be used to add or remove coordinate systems. When using the package API, DWFGraphicResource can be used to add or remove coordinate systems. Any application or user specific properties can be added since the coordinate system classes are property containers.
Publisher API Enhancements
- Allow choice of strong versus PKZIP-compliant passwords
A flag has been added to the DWFPackagePublisher to allow for stronger password encryption. This makes the passwords non-compliant with the PKZIP specification, but prevents anyone from easily determining the passwords using zip-password cracking tools. - Allow choice of compressing resources and sheets (or not)
Prior to version 7.3, the toolkit ran the compression algorithm on all resources, with the same compression level, while creating the archive. This release adds the capability to set a custom compression level on each resource. By default, certain resource types, for example JPEG, do not undergo any compression anymore since they are already compressed. When applying encryption for rights-management, compression is performed before the resource is encrypted. This enhances the level of compression. - DWFPublishableSection has a setLabel method. This allows a section label to be set on any section via the publishing API. Earlier the label could be set via the constructor only, requiring all derived sections to support it through their constructors as well.
- An initial display mode can now be set on DWFModel objects via the setDisplayMode method. This can be either Shaded, Edges, or both. This specifies the initial display mode when viewing the model.
64-bit Operating System Support
- Project files are supplied for 64-bit environments.
- The DWF Toolkit has been cross-compiled for these environments.
- Testing was conducted in 64-bit environments.
VIII. Getting Started
The best way to become familiar with the DWF Toolkit is to compile and run the supplied sample programs. Because different parts of the DWF Toolkit are used among a variety of departments within Autodesk, each with their own configurations and directory structures, some of the sample programs may not have been supplied with full compilation dependencies. In addition, whether you downloaded source or binary affects how much you may need to compile. The toolkit packages provide configurations for building libraries that read/write DWF files or just read DWF files. Since you may wish to investigate samples that both read and write DWF files, you will want to select a configuration that includes both. Be consistent across toolkits in the configurations that you select for compilation. Though the toolkits have separate read-write and read-only configurations for debug and release, the some of the sample programs themselves only have configurations for debug and release. In the event that a sample requires you to compile the parts yourself:
- Navigate to the "DWFToolkit-7.3\develop\global\build" directory (or wherever you have installed the DWF Toolkit).
- Navigate to the subdirectory for your compiler.
- Navigate to DWFCore. Build it.
- Navigate up one level and back down to WhipToolkit. Build it.
- Navigate up one level and back down to W3DToolkit. Build it.
- Navigate up one level and back down to DWFToolkit. Build it.
- Navigate to a desired sample such as "DWFToolkit-7.3\samples\DWFToolkit\SimpleEplotWriter." Build it. Run it. Play with it.
- Repeat the previous step for other samples.
IX. Operating Systems and Compilers
Operating System | C++ Compiler | Status |
---|---|---|
Microsoft Windows (2000, XP) | Microsoft Visual Studio .NET 2002 (MSVC 7.0) | supplied as legacy (untested) |
Microsoft Visual Studio .NET 2003 (MSVC 7.1) | built and QA tested | |
Microsoft Visual Studio 2005 (MSVC 8.0) | ||
Red Hat Enterprise Linux 3.0 (GNU/Linux Kernel 2.4 i686 i386) | gcc 3.2.3 | built |
Gentoo Linux (GNU/Linux Kernel 2.6 i686) | gcc 3.3.4 | built |
gcc 3.4.3 | ||
Apple Macintosh OS X (Darwin Kernel 7.5.0 powerpc) | gcc 3.3 | built |
XCode 1.5 |
A. Notes for Microsoft Windows
- If you are statically linking on Windows, you need these preprocessor defines:
- DWFTK_STATIC
- DWFTK_BUILD_EXPAT
- DWFCORE_STATIC
- DWFCORE_BUILD_ZLIB
- The Unicode Character set needs to be turned on.
- The multi-threaded DLL runtimes need to be used.
- If you are using Microsoft Visual Studio, you should set DisableSpecificWarnings="4290".
B. Notes for Linux
- Makefiles are not supplied for some items such as some of the sample programs.
- Most sample programs consist of only a few files, and makefiles can be constructed quite easily.
- To build on Ubuntu 6.06 with gcc 4.0.3
- To fix some changes involving STL, lines 225-229 in develop/global/src/dwf/Toolkit.h should change to:
const type1 --> type1 const
# define _DWFTK_STD_VECTOR(type) std::vector>
# define _DWFTK_STD_MAP_COMP(type1, type2, comp) std::map> >
# define _DWFTK_STD_MAP(type1, type2) _DWFTK_STD_MAP_COMP(type1, type2, less)
# define _DWFTK_STD_MULTIMAP_COMP(type1, type2, comp) std::multimap> >
# define _DWFTK_STD_MULTIMAP(type1, type2) _DWFTK_STD_MULTIMAP_COMP(type1, type2, less) - To build with without jpeg: In folder develop/global/src/dwf/w3dtk/jpeg:
use jconfig.doc as jconfig.h (cp jconfig.doc jconfig.h)
comment out test related parts from the Makefile (those files don't come with w3dtk) - Changed versions of these files can be found in linux_changes7.3.zip.
- To fix some changes involving STL, lines 225-229 in develop/global/src/dwf/Toolkit.h should change to:
X. DWF File Version History
The version of the DWF Toolkit is not to be confused with the version of a DWF file.
- A DWF file has a file version. It appears at the beginning of every DWF file. It is visible by viewing any DWF file with any text editor such as NotePad. (Note: The rest of the DWF will not appear readable in the editor.)
- The DWF Toolkit has a release version. The toolkit is incorporated into DWF-related applications. For example, the DWF Toolkit version is listed in the About box of Autodesk DWF Viewer and Autodesk Design Review.
The two versions are not the same. This is a common misconception. The following DWF file versions exist (or will exist):
Theme | Version info in file |
---|---|
single 2D sheet |
|
multiple 2D sheets |
|
single 3D model |
|
composite 3D model with multiple 2D sheets |
|
XI. Additional DWF Resources
In addition to the Autodesk discussion groups, another place to obtain information is from the Autodesk web site:
Topic | URL | Description |
---|---|---|
Autodesk DWF Viewer | www.autodesk.com/ dwfviewer |
This is the starting page for information about the free Autodesk DWF Viewer. |
Autodesk Design Review (formerly known as Autodesk DWF Composer) |
www.autodesk.com/ designreview |
This is the starting page for information about Autodesk Design Review. A tutorial is available on http://www.autodesk.com/ designreview-tutorial. |
Autodesk DWF Writer | www.autodesk.com/ dwfwriter |
This is the starting page for information about the free Autodesk DWF Writer. |
World of DWF | www.autodesk.com/ dwf |
This is the starting page for information about the Design Web Format itself. |
DWF Gallery | www.autodesk.com/ dwf-gallery |
This is a collection of sample DWF files submitted by Autodesk customers. |
DWF Customer Showcase | www.autodesk.com/ dwf-customers |
This is a collection of sample DWF files and associated success stories about Autodesk customers. |
Autodesk DWF Developer Center | www.autodesk.com/ dwf-developers |
This is the starting page for the DWF Developer Center. It has a variety of information as well as links that eventually lead to the DWF Toolkit. |
Autodesk DWF Toolkit | www.autodesk.com/ dwftoolkit |
This is a shortcut for navigating to the download page for C++ programmers to obtain one of the freely available DWF Toolkits. |
XII. DWF Partner Program
- Autodesk recently formalized its partner program as part of the Autodesk Developer Network (ADN). Members of the DWF Partner program get all the benefits that come with membership in the ADN and more, including access to the latest Autodesk design technologies and direct support from Autodesk. When you have joined ADN and have a working solution that you would like to market, please request an evaluation via a form on the Autodesk web site. If your application meets Autodesk's evaluation criteria, you will be invited to join the DWF Partner program. Once you become an official DWF Partner, getting noticed as a DWF Partner and increasing awareness for your products is easy. You will receive access to marketing information that will help you to gain a competitive advantage and highlight your DWF Partner status. What’s more, Autodesk will promote your company and DWF-based products in the DWF Center on www.autodesk.com/dwf-partners.
- Becoming a DWF Partner is not required to use the Autodesk DWF Toolkit. Becoming a DWF Partner is an opportunity for comarketing of your DWF-related application. As downloaded from the web, tech DWF Toolkit is not supported. By joining ADN you have access to additional materials which can aid you in your DFW development.
- If you do not wish to become an official DWF Partner but would like to submit your C++ code to our DWF Samples gallery, you may do so by completing a form on the Autodesk web site.