The enterprise or file geodatabase or the folder in which the output feature class will be created. This workspace must already exist.
Workspace; Feature Dataset
Feature Class Name
The name of the feature class to be created.
String
Geometry Type
(Optional)
Specifies the geometry type of the output feature class.
Point—The geometry type will be point.
Multipoint—The geometry type will be multipoint.
Polygon—The geometry type will be polygon.
Polyline—The geometry type will be polyline.
Multipatch—The geometry type will be multipatch.
String
Template Datasets
(Optional)
An existing dataset or a list of datasets used as templates to define the attribute fields of the new feature class.
Table View
Has M
(Optional)
Specifies whether the feature class will have linear measurement values (m-values).
No—The output feature class will not have m-values. This is the default.
Yes—The output feature class will have m-values.
Same as the template feature class—The output feature class will have m-values if the dataset specified in the Template Feature Class parameter (template parameter in Python) has m-values.
String
Has Z
(Optional)
Specifies whether the feature class will have elevation values (z-values).
No—The output feature class will not have z-values. This is the default.
Yes—The output feature class will have z-values.
Same as the template feature class—The output feature class will have z-values if the dataset specified in the Template Feature Class parameter (template parameter in Python) has z-values.
String
Coordinate System
(Optional)
The spatial reference of the output feature dataset. On the Spatial Reference Properties dialog box, you can select, import, or create a new coordinate system. To set aspects of the spatial reference, such as the x,y-, z-, or m-domain, resolution, or tolerance, use the Environments dialog box.
Note:
This parameter is optional, but providing a value is recommended. If no spatial reference is provided, the output will have an undefined spatial reference.
Note:
The spatial reference of the Template Feature Class value has no effect on the output spatial reference. If you want the output to be in the coordinate system of the Template Feature Class value, set the Coordinate System parameter to the spatial reference of the Template Feature Class value.
Spatial Reference
Configuration Keyword
(Optional)
The configuration keyword applies to enterprise geodatabase data only. It determines the storage parameters of the database table.
String
Output Spatial Grid 1
(Optional)
This parameter is not supported. Any value provided will be ignored.
Double
Output Spatial Grid 2
(Optional)
This parameter is not supported. Any value provided will be ignored.
Double
Output Spatial Grid 3
(Optional)
This parameter is not supported. Any value provided will be ignored.
Double
Feature Class Alias
(Optional)
The alternate name for the output feature class that will be created.
String
OID Type
(Optional)
Specifies whether the output Object ID field will be 32 bit or 64 bit.
Same as template—The output Object ID field type (32 bit or 64 bit) will be the same as the Object ID field of the first template dataset. This is the default.
The enterprise or file geodatabase or the folder in which the output feature class will be created. This workspace must already exist.
Workspace; Feature Dataset
out_name
The name of the feature class to be created.
String
geometry_type
(Optional)
Specifies the geometry type of the output feature class.
POINT—The geometry type will be point.
MULTIPOINT—The geometry type will be multipoint.
POLYGON—The geometry type will be polygon.
POLYLINE—The geometry type will be polyline.
MULTIPATCH—The geometry type will be multipatch.
String
template[template,...]
(Optional)
An existing dataset or a list of datasets used as templates to define the attribute fields of the new feature class.
Table View
has_m
(Optional)
Specifies whether the feature class will have linear measurement values (m-values).
DISABLED—The output feature class will not have m-values. This is the default.
ENABLED—The output feature class will have m-values.
SAME_AS_TEMPLATE—The output feature class will have m-values if the dataset specified in the Template Feature Class parameter (template parameter in Python) has m-values.
String
has_z
(Optional)
Specifies whether the feature class will have elevation values (z-values).
DISABLED—The output feature class will not have z-values. This is the default.
ENABLED—The output feature class will have z-values.
SAME_AS_TEMPLATE—The output feature class will have z-values if the dataset specified in the Template Feature Class parameter (template parameter in Python) has z-values.
String
spatial_reference
(Optional)
The spatial reference of the output feature dataset. You can specify the spatial reference in the following ways:
Enter the path to a .prj file, such as C:/workspace/watershed.prj.
Reference a feature class or feature dataset whose spatial reference you want to apply, such as C:/workspace/myproject.gdb/landuse/grassland.
Define a spatial reference object before using this tool, such as sr = arcpy.SpatialReference("Sinusoidal (Africa)"), which you then use as the spatial reference parameter.
Note:
This parameter is optional, but providing a value is recommended. If no spatial reference is provided, the output will have an undefined spatial reference.
Note:
The spatial reference of the Template Feature Class value has no effect on the output spatial reference. If you want the output to be in the coordinate system of the Template Feature Class value, set the Coordinate System parameter to the spatial reference of the Template Feature Class value.
Spatial Reference
config_keyword
(Optional)
The configuration keyword applies to enterprise geodatabase data only. It determines the storage parameters of the database table.
String
spatial_grid_1
(Optional)
This parameter is not supported. Any value provided will be ignored.
Double
spatial_grid_2
(Optional)
This parameter is not supported. Any value provided will be ignored.
Double
spatial_grid_3
(Optional)
This parameter is not supported. Any value provided will be ignored.
Double
out_alias
(Optional)
The alternate name for the output feature class that will be created.
String
oid_type
(Optional)
Specifies whether the output Object ID field will be 32 bit or 64 bit.
SAME_AS_TEMPLATE—The output Object ID field type (32 bit or 64 bit) will be the same as the Object ID field of the first template dataset. This is the default.
64_BIT—The output Object ID field will be 64 bit.
32_BIT—The output Object ID field will be 32 bit.
String
Derived output
Name
Explanation
Data type
out_feature_class
The new feature class.
Feature Class
Code sample
CreateFeatureclass example 1 (Python window)
The following Python window script demonstrates how to use the CreateFeatureclass function in immediate mode.
The following Python script demonstrates how to use the CreateFeatureclass function in a stand-alone script.
# Description: Create a feature class to store the gnatcatcher habitat zones
# Import system modules
import arcpy
# Set workspace
arcpy.env.workspace = "C:/data"
# Set local variables
out_path = "C:/output"
out_name = "habitatareas.shp"
geometry_type = "POLYGON"
template = "study_quads.shp"
has_m = "DISABLED"
has_z = "DISABLED"
# Use Describe to get a SpatialReference object
spatial_ref = arcpy.Describe("C:/workspace/studyarea.shp").spatialReference
# Run CreateFeatureclass
arcpy.management.CreateFeatureclass(out_path, out_name, geometry_type, template,
has_m, has_z, spatial_ref)