Solved

How add unique ID/Value to an Element

  • 8 January 2022
  • 7 replies
  • 401 views

Hello friends,

Im a new user of FME.

 

I have a dgn file with hundreds of points with or without tags. i need to convert this dgn to shp with unique custom ids. Is it any procedure or transformers to do this in fme. I mean each point should get unique id number

 

I tried with many videos and tutorials didn't solve my issue

 

thanks

icon

Best answer by takashi 9 January 2022, 12:00

View original

7 replies

Userlevel 2
Badge +17

Hi @chithramc​ , take a look at Counter transformer, which generates sequential number as new attribute for each input feature.

Hi @chithramc​ , take a look at Counter transformer, which generates sequential number as new attribute for each input feature.

Thank you Mr Takashi,

 

This transformer creating sequence id's, but its not reflecting in final shp file. any additional transformers need to add with this? please advice

SC attached

Thanks

 

ForumSequence numbers

Userlevel 2
Badge +17

Thank you Mr Takashi,

 

This transformer creating sequence id's, but its not reflecting in final shp file. any additional transformers need to add with this? please advice

SC attached

Thanks

 

ForumSequence numbers

It doesn't seem that the count attribute name matches destination attribute name.

 Try renaming the count attribute ("UUID") to the destination attribute name ("Road_As_ID"). See also this documentation.

Understanding Schema

 

Thank you Mr Takashi,

 

This transformer creating sequence id's, but its not reflecting in final shp file. any additional transformers need to add with this? please advice

SC attached

Thanks

 

ForumSequence numbers

Thank you Mr Takashi,

 

Your advise solve my issue to generate. . Is it any way to add text as a prefix on these newly generated sequential number.

 

thank you

 

ForumSequence numbers1 

Userlevel 2
Badge +17

Thank you Mr Takashi,

 

This transformer creating sequence id's, but its not reflecting in final shp file. any additional transformers need to add with this? please advice

SC attached

Thanks

 

ForumSequence numbers

Good to hear the Counter solved your question. You can use AttributeManager, AttributeCreator or StringConcatenator to create attribute value concatenate a prefix and the sequential number.

Hi all,

 

I have the same problem.

I changed the name of the counter and made it local count scope, but still, it's starting from 534.

Did you manage to solved it?

 

Thank you

Certainly! In FME, you can use the "Counter" transformer to assign unique ID numbers to each point in your dgn file. Here's a basic outline of the process:

  1. Read your dgn file using the appropriate reader (e.g., MicroStation Reader).
  2. Add a "Counter" transformer to your workspace and connect it to the reader.
  3. Set the "Counter" transformer's parameters to start from the value you want (e.g., 1) and increment by 1.
  4. The output attribute of the "Counter" will have a unique ID for each feature.
  5. Connect this to a writer (e.g., ESRI Shapefile Writer) to write the shp file with unique custom IDs.

Reply