Esri Shapefile .SHP Export Automation Options
Since the Export Options dialog is not displayed when the program is driven from an automation script, an options string can be specified in the script. The string consists of comma-separated parameters, which specify the behavior of the various export options. A typical example would be:
"Defaults=1,AreasToFile=0,PointsToFile=0"
This would first set all export options to their default values, then specify that all points and areas be output to as lines within the single shapefile.
Option |
Action |
Default |
Description |
AreasToFile |
0 = No, write areas as lines 1 = Yes, write areas as separate file |
1 |
Write areas to separate file. |
PointsToFile |
0 = No, write areas as lines 1 = Yes, write areas as separate file |
1 |
Write points to separate file. |
RenderMarkers |
0 = No, export as points 1 = Yes, render markers |
1 |
Any marker objects will be converted to areas for export; otherwise markers are exported as points. |
RenderText |
0 = No, discard text 1 = Yes, render text |
1 |
Any text objects will be converted to areas for export; otherwise text is discarded. |
Write3DObjects |
0 = No, write 2D SHP 1 = Yes, write 3D SHP |
0 |
Points, lines, and areas will be written with X, Y, and Z coordinates in the shapefile |
ExportCodePage |
Numeric value |
Western European (Windows) = 1252 |
The number of the ANSI code page to use when exporting Unicode data. Valid code page number in the range 0 through 65535. The ExportCodePage value is stored in the .CPG file and .DBF file in the same directory with the same name as the .SHP file. If characters from multiple languages are present, consider using code page 65001 (UTF-8). |
ScalingSource |
0 = previously saved 1 = application-supplied |
1 |
Use previously saved or application-supplied scaling source. |
SaveScalingInfo |
0 = No 1 = Yes |
0 |
Save scaling parameters for later use. |
PageLLX |
N.N |
|
Set application page rectangle lower left X value. |
PageLLY |
N.N |
|
Set application page rectangle lower left Y value. |
PageURX |
N.N |
|
Set application page rectangle upper right X value. |
PageURY |
N.N |
|
Set application page rectangle upper right Y value. |
FileLLX |
N.N |
|
Set scaling rectangle lower left X value. |
FileLLY |
N.N |
|
Set scaling rectangle lower left Y value. |
FileURX |
N.N |
|
Set scaling rectangle upper right X value. |
FileURY |
N.N |
|
Set scaling rectangle upper right Y value. |
Remarks
Note that if Shp_AreasToFile is set to 1, the file name used for the areas file will be the same as the specified export file name with the suffix Poly added to the basename. For example, if the specified export file name is ColoradoHydrography.SHP, the areas file will be ColoradoHydrographyPoly.SHP.
Likewise, if Shp_PointsToFile is set to 1, the file name used for the points file will be the same as the specified export file name with the suffix Pnts added to the basename.
See Also
Esri Shapefile File Description
Esri Shapefile Import Automation Options