If you have large numbers of DWG files to export to a different format (for example, a GIS file format), you can export them in bulk. The tutorial explains how to move a folder of DWG files to the SDF format in a single operation.
The first example shows limited capabilities and is intended to help you get started. The tutorial includes another example that does not have as many restrictions.
The examples in this tutorial illustrate batch techniques for exporting, but the same approach can be used to do importing. Also, although the examples use the SDF format, the approach can be used for any file-based format (SHP, DGN, and so on).
What You Need to Know
The batch-exporting process requires a DOS batch file, an AutoCAD script, and an AutoCAD Map 3D toolset Export profile. While the steps for creating these items are included here, you can find additional information on any of these areas:
- For information on DOS batch files, check the Internet.
- For information on AutoCAD Scripts, see "Customization Guide
Slides and Command Scripts
Create Command Scripts" in the AutoCAD Help (included in the AutoCAD Map 3D toolset Help).
- For information on
AutoCAD Map 3D toolset
Export profiles, see "Users Guide
Setting Up
Setting Options
Customizing and Automating Import and Export
Using Profiles" in the AutoCAD Map 3D toolset Help. Press F1 from anywhere in AutoCAD Map 3D toolset to see the Help.
What the Process Requires
To use this method, do the following:
- Copy all the DWG files to export into the same folder.
- Use a single AutoCAD Map 3D toolset export profile (.EPF file) for all exported files.
- Write all the exported files to the same destination folder.
- Use the same base filename for each exported file as its source DWG file. For example, Redding.dwg is exported to Redding.sdf, and so on.
- Store the script files and export profile in the same folder as the DWG files you are exporting.
How the Process Works
The batch file loops through the folder in which you stored the DWG files to export. It opens each DWG file it finds. Each iteration runs the script file and renames a temporary file for the current operation.
The script file exports the current DWG file, using the AutoCAD Map 3D toolset Export profile settings. Each time it completes this operation, it returns control to the batch file.
The script always creates a temporary SDF file and then renames it, because the instructions within a script cannot vary. For a more advanced solution, see "Refining the Process."