I use ArcEditor licence level, ArcGIS 10.0 version, and we're talking about a file geodatabase.

I have several feature classes (electric energy domain) and I want to connect them using relationship classes, so I want to use their ID's as foreign keys.

I want to automatically create a significant unique ID for each feature. It'a a text type ID, which would be composed of two letters and several numbers (ex. CH00123, CH00124). The ID would give me three info : what type of feature we're talking about (channel- CH), on which street it is (00), and it's unique code (123). I don't want to type this code for every feature I create, I need something to automatically assign an ID to each feature.

I am not sure how to handle this situation. Do I need to use a data integration software? an engine to generate my special ID's?

  • Have you discovered a solution for this issue yet? We are trying to accomplish the same thing only the data resides in a personal gdb. probably need to convert to file gdb. Let me know. Thanks.
    – hodeware
    May 8, 2013 at 17:14
  • try using Attribute Assistant the GENERATE-ID method.
    – Ligia
    May 9, 2013 at 6:18

4 Answers 4


If you want to assign IDs (or another field) automatically, you should programmatically create Class Extension that listens to edit events and updates corresponding Id field http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//000100000201000000


You just need to create a new field in your feature class and use the Field Calculator to create the unique ID based on fields in the class. Something like:

"CH%s%s" % (!StreetField!, !UniqueCodeField!)

using Python.


It might be worth looking at the Infrastructure Network Editing (ArcGIS 10) to see if the attribute assistant can be configured to create your IDs. I don't recall if it can be used outside of a network.



Infrastructure Network Editing also includes an editor extension called the Attribute Assistant. This extension uses a series of pre-defined methods to automatically populate attributes for you when updating and/or adding new features to the geodatabase.

I previously worked at utility where we did not use Infrastructure Network Editing and instead had custom tools based on megadrofan's approach. We moved the actual ID creation to database stored procs and the extension makes calls to the stored procs for ID values.

  • Remark, stored procs are only avaliable in enterprise geodatabases.
    – megadrofan
    Apr 6, 2012 at 11:21
  • Stored procs are available in the underlying relational database of an ent. gdb OR in a separate database independent of any geodatabase. So you can edit in pgdbs/fgdbs and still draw your ids from elsewhere (like a stored proc or a web service). Apr 6, 2012 at 12:37
  • Sorry, I was inaccurate in term enterprise geodatabase. Of course i meant underlying RDMS.
    – megadrofan
    Apr 6, 2012 at 13:04
  • Thank you all for your help. I'll let you know how I solved the problem.
    – Ligia
    Apr 9, 2012 at 13:39

Use ESRI's Attribute Assistant tool to assist with the auto-generation of unique IDs for each feature class: http://solutions.arcgis.com/shared/help/attribute-assistant/documentation/methods-sequences-and-id/. You can use the generate ID tool and custom logic to create your agency's unique ID.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.