Skip to main content
Solved

How add unique ID/Value to an Element

  • January 8, 2022
  • 7 replies
  • 2803 views

Forum|alt.badge.img+3

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

Best answer by takashi

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

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

takashi
Celebrity
  • January 8, 2022

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


Forum|alt.badge.img+3
  • Author
  • January 9, 2022

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


takashi
Celebrity
  • Best Answer
  • January 9, 2022

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

 


Forum|alt.badge.img+3
  • Author
  • January 10, 2022

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 


takashi
Celebrity
  • January 10, 2022

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.


moraalejandra93
Participant
Forum|alt.badge.img

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


  • August 9, 2023

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.