Feature Class To Geodatabase (Conversion)

License Level:BasicStandardAdvanced

Summary

Converts one or more feature classes or feature layers to geodatabase feature classes.

Usage

Syntax

FeatureClassToGeodatabase_conversion (Input_Features, Output_Geodatabase)
ParameterExplanationData Type
Input_Features
[Input_Features,...]

One or more feature classes or feature layers to be imported into an ArcSDE, file, or personal geodatabase.

Feature Layer
Output_Geodatabase

The output or destination geodatabase. This can be a file or personal geodatabase, or an ArcSDE 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
from arcpy import env
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 system modules
import arcpy
from arcpy import env
 
# Set environment settings
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

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
10/24/2012