I run the Copy Features tool to get a new feature class that is added to my File Geodatabase. This feature class is the result of a join with a Table also in the Geodatabase. The new feature works in ArGIS Pro but not in the older ArcCatalog and ArcMap. Then I try to export the resulting feature to another folder as a shape file and get two error codes: 308 and 210.
I have used this same process for years in ArcCatalog and ArcMap through 10.8 with no errors ever. I do this process to share the resulting feature class with colleagues.
I'm using ArcGIS Pro 3.3
Error below:
Feature Class To Shapefile
=====================
Parameters
Input Features 'Z:\Lone Star\ArcPro\Lone Star ArcPro.gdb\NAD27_TX_CENTRAL\TRACTS_CopyFeatures'
Output Folder Z:\Lone Star\Exported Shapes
Updated Output Folder Z:\Lone Star\Exported Shapes
=====================
Environments
Maintain fully qualified field names UNQUALIFIED
=====================
Messages
Start Time: Wednesday, September 18, 2024 2:54:35 PM
Failed to convert: Z:\Lone Star\ArcPro\Lone Star ArcPro.gdb\NAD27_TX_CENTRAL\TRACTS_CopyFeatures. ERROR 000210: Cannot create output Z:\Lone Star\Exported Shapes\TRACTS_CopyFeatures.shp
ERROR 000308: Invalid field type
Failed to execute (CopyFeatures).
Succeeded at Wednesday, September 18, 2024 2:54:39 PM (Elapsed Time: 3.28 seconds)
There are many steps that have to be taken now. You can export all of your feature layers that you want to save as a shapefile to a new geodatabase and loop through them using arcpy:
import arcpy
# Set the workspace and paths
arcpy.env.workspace = "C:\\Users\\your_geodatabase_path_here.gdb"
fc_list = arcpy.ListFeatureClasses()
for template_fc in fc_list:
new_fc=f'{name}_32b'
# Create a new feature class based on the template
arcpy.CreateFeatureclass_management(out_path=arcpy.env.workspace, out_name=new_fc, template=template_fc, oid_type='32_BIT')
# Get the list of fields in the feature class
fields = arcpy.ListFields(new_fc)
# Iterate through the fields and change the data type for Big Integer fields
for field in fields:
if field.type == "BigInteger":
arcpy.AlterField_management(new_fc, field.name, field_type="Double")
# append features to new feature class
arcpy.management.Append(template_fc, new_fc, schema_type='NO_TEST')
# save shapefile
output_folder="C:\\Users\\output_filepath_here"
arcpy.conversion.FeatureClassToShapefile(new_fc, output_folder)