Not Able to Create New Feature Class From Selecting By Attribute

429
1
Jump to solution
10-12-2018 11:45 AM
BehrouzHosseini
Occasional Contributor

Can you please take a look at this demo and let me know why I am not able to create new feature class from a shapefile  based on selecting by attribute and saving the new future in a Geodatabase?

The file is adding to the GDB but it is empty on attributes and geometry

# Import arcpy module
import arcpy


# Local variables:
Dataset = "D:\\GIS\\TPK\\src\\New Folder\\lui.gdb\\Dataset"
Louisiana = "Louisiana"
Louisiana__3_ = Louisiana
mm = "D:\\GIS\\TPK\\src\\New Folder\\lui.gdb\\Dataset\\mm"

# Process: Select Layer By Attribute
arcpy.SelectLayerByAttribute_management(Louisiana, "NEW_SELECTION", "\"NAME_2\" = 'Acadia'")

# Process: Create Feature Class
arcpy.CreateFeatureclass_management(Dataset, "mm", "POLYGON", "Louisiana", "DISABLED", "DISABLED", "", "", "0", "0", "0")
0 Kudos
1 Solution

Accepted Solutions
JoeBorgione
MVP Emeritus

I think you want to use Copy Features instead of Create Features.

That should just about do it....

View solution in original post

1 Reply
JoeBorgione
MVP Emeritus

I think you want to use Copy Features instead of Create Features.

That should just about do it....