Quantcast
Channel: Question and Answer » arcpy
Viewing all articles
Browse latest Browse all 767

FeatureClassToFeatureClass_conversion: How to export feature class to shapefile without losing OBJECTID

$
0
0

I am trying to automate a workflow which involves exporting multiple feature classes (within a geodatabase) to shapefile format.

My inclination has been to use the FeatureClassToFeatureClass_conversion() tool, which I’ve had success with for similar jobs in the past.

The problem is that all shapefiles outputted by FeatureClassToFeatureClass_conversion() are stripped of their OBJECTIDs. Once exported, these shapefiles must undergo a validation cycle that requires the OBJECTID be intact.

What I’m looking for is the arcpy equivalent of the export data feature in ArcMap, which does not delete the OBJECTID field (FID field is ok).

When I look through the documentation I keep getting directed back to the same FeatureClassToFeatureClass_conversion tool. I feel like there’s something major I am missing here, but I simply haven’t been able to find a solution in the docs or on the web.

Any suggestions?


Viewing all articles
Browse latest Browse all 767

Latest Images

Trending Articles



Latest Images