Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Spatial Statistics toolbox > Utilities toolset > Tools

Export Feature Attribute to ASCII (Spatial Statistics)

Release 9.2
Last modified January 9, 2009
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

Exports feature class coordinates and attribute values to a space-, comma-, or semicolon-delimited ASCII text file.


Usage tips

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.

  • Space — Feature coordinates and attribute values will be separated by a space in the output.
  • Comma — Feature coordinates and attribute values will be separated by a comma in the output.
  • Semi-colon — Feature coordinates and attribute values will be separated by a semicolon in the output.

String
<Output_Ascii_File>

The ASCII text file that will contain the feature coordinate and attribute values.

File
Data types for geoprocessing tool parameters


Command line example

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.

  • Space — Feature coordinates and attribute values will be separated by a space in the output.
  • Comma — Feature coordinates and attribute values will be separated by a comma in the output.
  • Semi-colon — Feature coordinates and attribute values will be separated by a semicolon in the output.

String
Output_Ascii_File (Required)

The ASCII text file that will contain the feature coordinate and attribute values.

File

Data types for geoprocessing tool parameters


Script example

# 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()

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.