The next step is to create an AutoCAD script. An AutoCAD script is a text file that issues the commands you would type at the Command prompt in AutoCAD Map 3D toolset to execute an operation. It has some special syntax to make sure that the commands are properly executed outside the application.
This exercise continues the process of batch-exporting from the previous exercise, Creating the Export Profile.
Each line in the script file is a response to a Command prompt within the export operation.
The finished script file looks like the following example (except for your replacements for file and folder names):
_-mapexport FDO_SDF SDFs\Temp.sdf _yes D:\Demo\MyExport.epf _proceed _quit
Create the script file in a text editor, such as Notepad.
To create the script file
_-mapexport
This line initiates the export operation. The underscore indicates that the command or prompt will be in English (and will not be translated). Therefore, the script runs in any language.
FDO_SDF
This line is the Command prompt response to "Enter file type to export to, or ? for list <FDO_SDF>:" It specifies that you will export the DWG file to SDF format.
SDFs\Temp.sdf
Replace SDFs\ with the name of the folder where you will store the temporary SDF files required by the operation.
This line is the Command prompt response to "Enter name of file to create <D:\PreviousExport.sdf>:"
_yes
This line is the Command prompt response to "Load Profile? [Yes/No] <No>:" In this case you want to load a profile.
D:\Demo\MyExport.epf
Specify the same folder as the DWG files to export.
This line is the Command prompt response to "Enter path and name of .EPF file for options:"
_proceed
This line is the Command prompt response to "Change options [Selection/Data/Options/ Proceed] <Proceed>:"
_quit
This line ends the script and returns control to the batch file.
Save the script file in the same folder as the DWG files to export.
To continue this tutorial, go to Creating the Batch File.