Solved

Convert text from .dwg file.


Greeting. I have a file from autocad (.dwg) from which I would like to extract the postal address numbers in the form: NR.20, NR.16a, NR.83

I would like to remove from the column special characters such as: ???, / , or - as well as text names like TEREN VIRAN

For example I have NR-130-TEREN-VIRAN, I wish to have just NR.130

Or: from NR-137/F I wish to have NR.137F

FMEAll the best.

 

icon

Best answer by caracadrian 3 June 2021, 10:19

View original

2 replies

Badge +20

One way to do it is to use AttributeSplitter with Delimiter set to "-" folowed by ListExploder, Tester set to Contains Regex "\\d" and a StringReplacer to get rid of the "/".

expode textexploded textYou can concatenate NR. back by any method you like: AttributeCreator, AttributeManager, StringConcatenator, etc.

Am atasat si un workspace care face partea explicata 👍

One way to do it is to use AttributeSplitter with Delimiter set to "-" folowed by ListExploder, Tester set to Contains Regex "\\d" and a StringReplacer to get rid of the "/".

expode textexploded textYou can concatenate NR. back by any method you like: AttributeCreator, AttributeManager, StringConcatenator, etc.

Am atasat si un workspace care face partea explicata 👍

Thank you very much!

I modified the script as needed here and there and it works great. Thank you very much!

All the best!2021-06-03_121438 

 

 

Reply