Versatile and powerful object oriented C++ API used to create CAD and technical graphics applications of any size
With Teigha for .dwg files, create simple utilities to full CAD systems with these features:
- Access and save all data in .dwg and .dxf files.
- Create .dwg and .dxf files of any size and containing any object type.
- Render (view) and edit (redline) objects.
- Batch edit .dwg and .dxf files (e.g., turn layers on/off or replace text strings in a series of files).
- Convert to/from .dwg and .dxf files, including any supported legacy version.
- Export data to SVG, PDF, DWF, BMP, STL files. Import DWF files.
- Generate thumbnails.
- Access custom objects.
Teigha for .dwg files is available for download by ODA members. Not a member? Several sample applications and a subset of the documentation can be found in Public Downloads.
Detailed Features
- Supported DWG™, DXF, and BDXF file formats:
- Read support for .dwg files created in Autodesk® AutoCAD® 2.5 through AutoCAD 2011.
- Write support for .dwg files created in AutoCAD 12 through AutoCAD 2011.
- Render .dwg and .dxf files using GDI, OpenGL, or DirectX with the ability to select entities.
- Recover and repair damaged .dwg files.
- Edit and manipulate .dwg file data programmatically, including (with many more):
- Explode an entity into a set of simpler entities.
- Apply a transformation to an entity.
- Modify arbitrary properties of database objects.
- Clone a database object.
- Export .dwg and .dxf file data to SVG, PDF, DWF, BMP, STL.
- Import DWF files.
- Support custom objects — users can create custom objects that are usable within any Teigha for .dwg files host application.
- Support external files such as font files (TTF/SHX), linetype files (LIN), and hatch pattern files (PAT).
- Recompute dimension geometry from dimension settings.
- Support transactions and undo/redo capabilities.
- Support partial .dwg file load capabilities, allowing fast access to small subsets of drawing entities (entities are loaded from disk only if they are explicitly accessed by the client).
- Customize memory management allowing client applications to control memory allocation/deallocation.
- Support “round-trip” data. For example, when saving a 2007 .dwg file back to R14, 2007-specific properties are saved to the R14 file as xdata and then restored if the file is loaded back into a 2007-compatible application.
- Support ACIS internally, including rendering (wireframe and shaded) for embedded ACIS 3D solids and access to the underlying boundary representation data stored within an ACIS entity.
- Implement custom commands.
- Integrate with third-party components. More details at Third Party Components.
Example Applications
Teigha for .dwg files comes with several example applications that cover a wide range of user applications, including:
- OdReadEx – Demonstrates how to read a .dwg or .dxf file and extract entity level data from the file.
- OdWriteEx – Demonstrates the programmatic creation of a .dwg file containing examples of most supported entity and object types.
- OdCopyEx – Load any .dwg or .dxf file and save a specified version and type.
- OdDwfImportEx – Demonstrates DWF import capabilities.
- OdDwfExportEx – Demonstrates DWF export capabilities.
- OdaMfcApp – MFC application which demonstrates rendering, entity selection, grip points, PDF export, custom commands, and many other features.
Supported Operating Systems and Compilers
Note: Additional platforms may be provided upon request.
| Windows 2000, ME, XP, Vista |
Visual Studio 6, 2002, 2003, 2005, 2008 (static/dll) Borland Builder 6, 2006, 2009 (static) |
| Windows CE |
Visual Studio 2005 (ARMV4/ARMV4I static) |
| Windows x64 |
Visual Studio 2005, 2008 (static) |
| Linux (x86/x64) |
Gcc 3.3, 3.4, 4.1, 4.2 (static/dynamic) |
| Mac OS/X (ppc/x86/x64) |
Gcc using 10.3, 10.4, 10.5 SDK (static/dynamic) |
| SGI |
MIPSpro C++ Compiler 7.3 (static) |
| Solaris (Sparc/x86/x64) |
Sun C++ Compiler (static) Gcc 3.4 (static) |
| HP-UX (RISC) |
aC++ (static) |
| IBM AIX |
XL C++ Compiler (static) |
DWG is the native and proprietary file format for AutoCAD® and a trademark of Autodesk, Inc. The Open Design Alliance is not associated with Autodesk.