Summary
Converts one or more feature classes or feature layers to geodatabase feature classes.
Usage
If the input is a layer with selected features, only those selected features will be written to the new output feature class.
The name of the output feature classes will be based on the name of the input feature class name. For example, if the input is C:\base\streams.shp, the output feature class will be named streams.
If the name already exists in the output geodatabase, a number will be appended to the end to make the feature class name unique (for example, rivers_1.
This tool does not support annotation.
- Learn more about how to control the output feature class name with the Feature Class to Feature Class tool
Syntax
FeatureClassToGeodatabase_conversion (Input_Features, Output_Geodatabase)
Parameter | Explanation | Data Type |
Input_Features [Input_Features,...] | One or more feature classes or feature layers to be imported into a file, personal, or enterprise geodatabase. | Feature Layer |
Output_Geodatabase | The output or destination geodatabase. This can be a file, personal, or enterprise geodatabase. | Feature Dataset; Workspace |
Code sample
FeatureClassToGeodatabase example (Python window)
The following Python window script demonstrates how to use the FeatureClassToGeodatabase function in immediate mode.
import arcpy
arcpy.env.workspace = 'C:/data'
arcpy.FeatureClassToGeodatabase_conversion(['climate.shp', 'majorrds.shp'],
'C:/output/output.gdb')
FeatureClassToGeodatabase example 2 (stand-alone script)
The following stand-alone script demonstrates how to use the FeatureClassToGeodatabase function.
# Name: FeatureClassToGeodatabase_Example2.py
# Description: Use FeatureClassToGeodatabase to copy feature classes
# to geodatabase format
# Import modules
import arcpy
# Set environment settings
arcpy.env.workspace = 'C:/data'
# Set local variables
inFeatures = ['climate.shp', 'majorrds.shp']
outLocation = 'C:/output/output.gdb'
# Execute TableToGeodatabase
arcpy.FeatureClassToGeodatabase_conversion(inFeatures, outLocation)
Environments
- Current Workspace
- Scratch Workspace
- Output Coordinate System
- Geographic Transformations
- Extent
- XY Resolution
- XY Tolerance
- Output has M values
- M Resolution
- M Tolerance
- Output has Z values
- Default Output Z Value
- Z Resolution
- Z Tolerance
- Qualified Field Names
- Output CONFIG Keyword
- Auto Commit
- Output Spatial Grid 1
- Output Spatial Grid 2
- Output Spatial Grid 3
- Output XY Domain
- Output M Domain
- Output Z Domain
Licensing information
- ArcGIS Desktop Basic: Yes
- ArcGIS Desktop Standard: Yes
- ArcGIS Desktop Advanced: Yes