This question regarding ArcToolbox. I am trying to copy an empty feature class to create multiple empty feature classes with various geometries.
All I want to know is how to copy the feature class (template) so I can get just the fields and associated domain values, and no geometry type from the one that I am copying from. Instead, I want to explicitly pass the geometry type for each feature class from an input Excel file. And delete the selected fields from value list as required after copying.
I used below code but it copies and adds the fields in the empty feature classes, but it has higher time complexity and solution is not efficient when it comes to copying fields to the multiple feature classes. So I am looking for something that just copies the feature class straight away without taking the geometry into consideration.
core_fields = arcpy.GetParameterAsText(2)
feature_classes = pd.read_excel(xls)
fields = arcpy.ListFields(r"E/abc.gdb/featureclassName")
for i in range(0,len(feature_classes)):
rvalue = feature_classes['in_table'][i]
for field in fields:
for c_field in core_fields:
if c_field == str(field.name):
arcpy.AddField_management(rvalue,field.name, field.type, field.precision, field.scale, field.length, field.aliasName,"", field.required, field.domain)