Write Features to Text File (Samples)
Summary
Writes feature coordinates to a text file.
 Legacy:
Legacy:Usage
- 
Output from this tool is in the same format as described for the input to the Create Features From Text File tool. 
- 
Output coordinates are space delimited with the decimal separator of your choice. 
- 
Outputs with null values for z or m will have the value 1.#QNAN for those positions. 
- 
Selecting the locale decimal point option will result in the output being separated by whatever the system decimal point is set to. If the system is on a German locale, the output will take the form 1234,5. If the system is on a United States locale, the output will take the form 1234.5 
- 
Selecting the default Python output option will result in the output being separated by whatever Python is using for a decimal point. This is usually a period. 
- 
Point features will be output to the following format: Point id x y z m id x y z m ... END 
- 
Multipoint features will be output to the following format: Multipoint multipoint_id 0 pnt_id x y z m pnt_id x y z m ... multipoint_id 0 pnt_id x y z m ... END 
- 
Line features will be output to the following format: Polyline line_id part_number pnt_id x y z m pnt_id x y z m ... line_id part_number pnt_id x y z m pnt_id x y z m ... END 
- 
Polygon features will be output to the following format: Polygon polygon_id part_number pnt_id x y z m pnt_id x y z m ... InteriorRing pnt_id x y z m pnt_id x y z m ... polygon_id part_number pnt_id x y z m pnt_id x y z m ... END 
- 
No environment settings affect this tool. 
Syntax
| Parameter | Explanation | Data Type | 
| input_features | The input features to be written to a text file. | Feature Layer | 
| output_text_file | The output text file. | Text File | 
| decimal_separator_character | The character that will separate the whole number from the decimal. 
 | String | 
Code Sample
# Create geoprocessing dispatch object
import arcgisscripting
gp = arcgisscripting.create()
 
# Set up inputs to tool
inFC= r"C:\temp\routes.txt"
TxtCoords = r"C:\temp\RteCoords.shp"
sep = "locale decimal point"
 
# Run tool
gp.WriteFeaturesToTextFile(inFC, TxtCoords, sep)