Skip to main content
Solved

How add unique ID/Value to an Element

  • January 8, 2022
  • 7 replies
  • 2190 views

Forum|alt.badge.img+2

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

chithramc wrote:

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

 

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

7 replies

takashi
Influencer
  • 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+2
  • Author
  • January 9, 2022
takashi wrote:

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
Influencer
  • Best Answer
  • January 9, 2022
chithramc wrote:

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+2
  • Author
  • January 10, 2022
chithramc wrote:

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
Influencer
  • January 10, 2022
chithramc wrote:

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.

Reply


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