CadastreMicrostation-Bentley

Find and Replace Using Regular Expressions: Microstation

Finding and replacing is a common feature, I've explained it For Excel. When applying it in mapping or CAD, the possibilities of finding exactly what we are looking for are more complex, since it is not only the Attribute search.

The problem, replace texts

I have a map with more than 800 numbered properties. I need that the property numbers that represent the streets, rivers and other public property have only one text.

The issue is that in order to re-link it, I require that instead of having 92345, which was an allocated land number, have a river R, a street C, a L of lagoon, etc.

Replace text microstation

So, for example, I need to put an R for texts above 92,000, since they are rivers. Then to the texts above 93,000 put a C, because they are streets. bla bla bla.

Use regular expressions

This in previous versions of Microstation always existed, but from the versions V8i, it brings a little tab that suggests it, and it can activate or not the functionality.

It is always done from Edit> find and replace.

The panel that is displayed, gives us the option to place what we are looking for, what content is going to replace it, and some conditions like control of capitulas, search in blocks, fence.

We select the "Use Regular Expressions" option, which activates the top tab, which shows what possibilities can be included in the search string.

See that if I put the text 92, then three points, I can have all the numbers greater than 92,000. And so select to be replaced with a letter R.

Replace text microstation

With the Find option, the display scrolls to the selected text, and navigates to the next ones.

If I execute "Replace All", all texts will be replaced.

Similarly, to replace street text, which has a range above 93,000, I need to put 93 ... and replace with C.

Other regular expressions

The possibilities of using other search needs are varied.

  • The ^ symbol is used to indicate the start of a line. Suppose we have a number 292010, we would not want it to be included. Then, the string would be ^ 92…, which will only find the texts that start with 92, which have three characters in a row.
  • The $ symbol for the end. Suppose I need to find the texts that end with the number 10, then 10 $ is written
  • The dot is used for characters, the asterisk for zero or more, the + sign for 1 number or more.
  • If you expect to find only ASCII digits, then we use the acronym: dy if we wait only alphabetically, we use: a
  • If we want a range of characters, we can use the square brackets

To know more, I suggest the basics: Wikipedia.

Golgi Alvarez

Writer, researcher, specialist in Land Management Models. He has participated in the conceptualization and implementation of models such as: National Property Administration System SINAP in Honduras, Management Model of Joint Municipalities in Honduras, Integrated Cadastre-Registry Management Model in Nicaragua, Territory Administration System SAT in Colombia . Editor of the Geofumadas knowledge blog since 2007 and creator of the AulaGEO Academy that includes more than 100 courses on GIS - CAD - BIM - Digital Twins topics.

Related Articles

Leave a comment

Your email address will not be published. Required fields are marked with *

Back to top button