Home > Microstation / Bentley > Microstation Geographics, link to Database

Microstation Geographics, link to Database

TRANSLATION NOTES: Please read some comments at the end of this post.

Although Geographics is a Bentley’s legacy version, after Bentley Map and Cadastre came to stay, here I summarize some annotations to a pupil who wants to connect to a database maps from a Geographics project.

About Previous topics

In some post I have explained how some Geographics’ guts function; this summary of nearly 15 entries shows that I really have enjoyed it.

  1. The feature book
  2. Theming
  3. Topological Cleaning
  4. Connect lines
  5. Topological analysis
  6. Connect a local project
  7. Import from shape files
  8. Create coordinate mesh
  9. Some differences with Bentley Map
  10. Develop with VBA
  11. Differences with Cadastre
  12. Migrate to Bentley Map
  13. Smokes with G! Tools
  14. Inspiring examples

What happens is that Geographics was always like this; it means software from you had to know smoked things to implement it at administrator’s level. While users should learn to do basic routines to implement it, yet it is a tool that despite Bentley unresponsive support is still defended tooth and nail by users who don’t want to let it go.

To what connect this

Geographics can be connected at least to Oracle, SQLServer, or Access databases, preferably via ODBC but these aren’t the unique bases or the single connection mode. The connection is created, as I explained it in paragraph 6 of the previous list.

What to connect

Geographics, in these versions works via object connection link (engineering links), which can be a line, point, cell or polygon. This connection works as follows:

  • Connecting object must be on the map, suppose a tab number like 425876.
  • The MsLink is a number not repeated in a map and associated once the object is linked to the database.
  • The MapID is a number that associates the MsLink with the registered map, so a MsLink can be repeated from a bitmap to another; the difference is in bitmap’s registry number, topic that I explained in paragraph 12 of the top list.
  • Once linked, you can view other database tables in Geographics, such as the roll of contributors, cadastral values … And with these do operations as topological analysis, thematic maps, annotation to map, etc.

The database

  • To be able to interact with a Geographics project, the database project must contain the following tables:

category
feature
mapsmscatalog
ugcategory
ugcommandugfeature
ugjoin_cat
ugmap
ugtable_cat

  • Additionally, the table that you want to connect, as the cadastral register (suppose it is called tab) must add a column called MsLink, such as I write it with the M and L in uppercase. And this must be AutoNumber type; so every time that you create a new tab it is assigned a number that is not repeated.
  • Also, it should be added at the table the following columns:

Area, these columns name doesn’t matter, what interests it is numeric value with two decimal places. This will be to upgrade the property’s area in the database.

Perimeter, like the previous one, it is used to store the sum value of the property’s sides.

x1, y1, x2, y2.  These are four columns in which to store the coordinates that define the range of the property, and that will be useful to go to the selected property (locate), as well as for publication in Geoweb Publisher.

  • Then, within the database, in mscatalog’s table must be included the roll table and assigned an identifier. This in order to be seen the table from Geographics in the next step and it can be registered in the catalogue.

clip_image001The maps

  • Map must register, this is done from project / setup / register map / dgn file. With this, map acquires a number ugmaps table. .
  • It also should create from Geographics the created table. For this you should go to Project / setup / tables / table catalog. Here it is created, by placing FICHA as name, MSLINK (capitalized) in the primary key and an alias, in this case FC. Then Commit. With this, we are ready to link.

clip_image002

The link

The object will be linked to a field in the FICHA table, using the mslink as primary key clip_image003and based on a match with the clave_ficha column.

There should be a unique match between the object which be linked (suppose tab number in the map) and an identifier in the registry. It may well be the card number or cadastral key, but it should not be repeated on the same map.

To tie, place a fence, then Database / text manager. We left switched on only the card number level, to proceed to the link. Then we choose the name of the table where we want to link and the column containing the match. In this case the objects chosen are the FICHA table and clave_ficha column.

We activate the option Use Fence, chose the Join button and we click on the screen.

  • Ready, Gegraphics sought all those fields with the tab number in the map, which coincided with the database tab number in the FICHA table and clave_ficha column. And then it made a link through the auto numbering mslink existing in that column. A way to try it is using the review attributes command; it should lift the associated table.
  • To update area and perimeter, it has to be left assets levels or features from the boundary property block and centroids features. Then it is applied Database / perimeter update area.
  • To update coordinates it is applied Database / coordinate update.
  • Insert is to create a new record in the database, update to upgrade.

I know, and I am aware. Now you understand why these things are automated with VBA tools…

However, learning its logic was a mental exercise which developed some sector of our brain. The Geospatial Administrator is also tricky (*).

TRANSLATION NOTES:

(*) Tambien tiene sus bemoles: This is a Spanish idiom which means that something is tricky and not so easy.

2 comments

  1. Jan Skvarek

    Where I can find structure of necessary tables category
    feature
    mapsmscatalog
    ugcategory
    ugcommandugfeature
    ugjoin_cat
    ugmap
    ugtable_cat ?

    It is possible map (import) our datatabase data like townname, GPS coordinates, descriptions, … into bentley, so we will be enable to see this data. I hav to do some script ?

    Thank You

    Jan

    • eg!

      To know the necessary structure, you can create a new project in Microstation Geographics. It will create a MDB or SQL empty database with the needed tables and relations.

      Yes, you can import data to the Geographics database to query that from the map.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.