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")
Solved! Go to Solution.
I think you want to use Copy Features instead of Create Features.
I think you want to use Copy Features instead of Create Features.