English

Problem: Unable to maintain ObjectIDs when exporting a feature class to a new feature class

Description

When exporting a feature class to a new feature class, the original ObjectIDs are not maintained in the new feature class. Occasionally, the original ObjectIDs must be maintained because they are used in existing workflows or functions.

When features are deleted or edited, the ObjectID range can vary and the order can change. For example, the values may start from a number other than 1, or there are large sections of numbers missing, such as 1- 10, 25 – 50, and so on. This is because when features or records are deleted or edited, ObjectIDs continually build in sequential order and do not replace values which were deleted.

For more information, refer to the following article, FAQ: Are ObjectID values repeated for features in a feature class or for records in a table?

Cause

The regeneration of ObjectIDs after exporting or creating a new output feature class is by design; ArcGIS assigns a new set of ObjectIDs to a feature class when it is exported. The ObjectIDs are unique IDs to identify rows in tables in a geodatabase and start from 1 and end at a particular number. ArcGIS automatically assigns and manages ObjectIDs to tables or feature classes when both elements are created via ArcGIS, or were created outside ArcGIS and registered with the geodatabase.

Solution or Workaround

To maintain the original ObjectIDs in the exported feature class, create a new field (for example, OriginalOIDs) in the original feature class before exporting, and populate the values using the Field Calculator.

1. In the attribute table of the feature class, create a new field and name the field as OriginalOIDs, for example.

[O-Image]
2. Populate the values for the OriginalOIDs field using the Field Calculator. For more information, refer to the following article, HowTo: Calculate field values from an existing field to a new field in ArcMap. The new field is assigned with values from the ObjectID field.

[O-Image]
3. Once the new field is created in the existing feature class, export the feature class to another geodatabase. The new feature class has the new ObjectID field and the OriginalOIDs field with the necessary values in the attribute table.

[O]

    Related Information