Export Feature Attribute to ASCII (Spatial Statistics) |
|
Release 9.2
Last modified January 9, 2009 |
![]() ![]() ![]() Print all topics in : "Tools" |
Exports feature class coordinates and attribute values to a space-, comma-, or semicolon-delimited ASCII text file.
Usage tips
This tool is used to export data for analysis with external statistical packages.
The environment settings do not have an effect on this tool.
Command line syntax
An overview of the Command Line window
ExportXYv_stats <Input_Feature_Class> <Value_Field> <Space | Comma | Semi-Colon> <Output_Ascii_File>
Parameter | Explanation | Data Type |
<Input_Feature_Class> |
The feature class from which to export feature coordinates and attribute values. |
Feature Layer |
<Value_Field> |
The field in the input feature class containing the values to export to an ASCII text file. |
Field |
<Space | Comma | Semi-Colon> |
Specifies how feature coordinates and attribute values will be separated in the output ASCII file.
|
String |
<Output_Ascii_File> |
The ASCII text file that will contain the feature coordinate and attribute values. |
File |
workspace e:\project93\data ExportXYv burglary.shp SCLASS Comma burglary.txt
Scripting syntax
About getting started with writing geoprocessing scripts
ExportXYv_stats (Input_Feature_Class, Value_Field, Delimiter, Output_Ascii_File)
Parameter | Explanation | Data Type |
Input_Feature_Class (Required) |
The feature class from which to export feature coordinates and attribute values. |
Feature Layer |
Value_Field (Required) |
The field in the input feature class containing the values to export to an ASCII text file. |
Field |
Delimiter (Required) |
Specifies how feature coordinates and attribute values will be separated in the output ASCII file.
|
String |
Output_Ascii_File (Required) |
The ASCII text file that will contain the feature coordinate and attribute values. |
File |
# Export feature locations and attributes to an ASCII text file # Import system modules import arcgisscripting # Create the Geoprocessor object gp = arcgisscripting.create() # Local variables... workspace = "c:/project93/data" input_features = "AidsByCaCnty.shp" export_ascii = "aidsbycacnty.txt" try: # Set the current workspace (to avoid having to specify the full path to the feature classes each time) gp.workspace = workspace # Process: Export Feature Attribute to Ascii... gp.ExportXYv_stats(input_features, "HEPRATE", "Space", export_ascii) except: # If an error occurred when running the tool, print out the error message. print gp.GetMessages()