Skip to main content
Solved

How to create unique IDs and autogenerate unique IDs in a Feature Class?

  • June 4, 2024
  • 1 reply
  • 218 views

vxn43
Supporter
Forum|alt.badge.img+18

I need to create unique Ids for a point feature class. Also, when a new point is added to the class I need to the unique Id created automatically when the workspace is run. 

I have created a workspace that includes the File Geodatabase Point Feature Class Reader then the Counter Transformer to create a new field named _count and a new field in AttributeManager named Facility_ID. 

 

All the unique Ids will be formatted as follows: BLDG-000000001, BLDG-000000002, etc…

When a new Building Point is added to the Feature Class, the Facility_ID field will automatically be populated with a unique ID in sequence increments of 1; example if the highest unique id in the feature class is BLDG-000000109, then when a new building is added it’s unique id will be BLDG-000000110.

 

What else do I need to do? any assistance is much appreciated. 

 

 

Best answer by vxn43

I figured it out. 

I used the Counter to generate the unique numeric ids; 

I then used the StringPadder to add 9 zeros to the left;

In Attribute Manager I added the Facility_ID field calculated with “BLDG@value(_count) the result is the following values: BLDG-000000001, BLDG-000000002, … , BLDG-000000010, …, BLDG-000193426

 

When a new point is added in ArcMap, this workspace is run and the output has a new unique ID for each newly added point. 

 

Note in my screenshots I did not include the writer, since I am in the dev phase of this workspace. 

 

If anyone has another way to do this, please share. 

 

 

 

View original
Did this help you find an answer to your question?

1 reply

vxn43
Supporter
Forum|alt.badge.img+18
  • Author
  • Supporter
  • Best Answer
  • June 4, 2024

I figured it out. 

I used the Counter to generate the unique numeric ids; 

I then used the StringPadder to add 9 zeros to the left;

In Attribute Manager I added the Facility_ID field calculated with “BLDG@value(_count) the result is the following values: BLDG-000000001, BLDG-000000002, … , BLDG-000000010, …, BLDG-000193426

 

When a new point is added in ArcMap, this workspace is run and the output has a new unique ID for each newly added point. 

 

Note in my screenshots I did not include the writer, since I am in the dev phase of this workspace. 

 

If anyone has another way to do this, please share. 

 

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings