Microstation Geographics, connect to Database

Although Geographics is a legacy version of Bentley, after Benley Map and Cadastre are here to stay, here are some notes for a student who wants to connect a database of Geographics project maps.

From previous topics

In some post I've explained before how some guts of Geographics work, this summary of almost 15 entries shows that I really enjoyed it.

  1. The feature book
  2. Thematic
  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. Development with VBA
  11. Differences with Sign
  12. Migrate to Bentley Map
  13. Smoked with G! Tools
  14. Inspirational examples

What happens is that Geographics was always like this, a software that had to know smoked things to implement at the administrator level. While users had to learn to do basic routines to apply it, yet it is a tool that even though Bentley does not respond in support, it is still being defended by those who do not want to let it go.

What to connect

Geographics can be connected to at least Oracle, SQLServer or Access databases, preferably via ODBC, although they are not the only bases or the only connection mode. The connection is created, as I explained in section 6 of the previous list.

What to connect

Geographics, in these versions it works via object connection links (Engeneering links), which can be a line, point, cell or polygon. This connection works in the following way:

  • The connecting object must be on the map, suppose a tab number of the 425876 form.
  • The MsLink is a number that is not repeated on a map and is associated once the object is linked to the database.
  • The MapID is a number that associates the mslink with the registered map, so an MsLink can be repeated from one map to another, the difference is in the map registration number, which I explained in 12 in the top list.
  • Once linked, it is possible to visualize in Geographics other tables of the database, such as the taxpayer registry, cadastral values ​​... And with these operations, such as topological analysis, thematic maps, annotations to the map, etc.

The database

  • In order to interact with a Geographics project, the database must contain the following tables:

category
feature
Mapsmscatalog
Ugcategory
Ugcommandugfeature
Ugjoin_cat
Ugmap
Ugtable_cat

  • In addition, the table to which it is desired to connect, such as the cadastral register (suppose it is called plug) you must add a column called MsLink, as I write it, with the M and L in uppercase. And this must be of the autonomic type, so every time a new card is created it is assigned a number that will not be repeated.
  • Also to the table must be added the following columns:

Area, the name of these columns does not matter, what is interesting is that it is numeric with two decimals. This will be to be able to update the area of ​​the property in the database.

Perimeter, Just like the previous one, to store the value of the sum of the sides of the property.

x1, Y1, x2, y2. These are four columns where the coordinates that define the range of the property will be stored, and they will be useful to go to the property (locate) Selected, just as it is to be published in Geoweb Publisher.

  • Then, in the database, in the mscatalog table it is necessary to include the table of the standard and assign it an identifier. This so that the table can be seen from Geographics in the next step and can be registered in the catalog.

The maps

  • The map must be registered, this is done from Project / setup / register map / dgn file. With this, the map acquires a number in the ugmaps table.
  • The created table must also be created from geographics. For this you have to go to Project / setup / tables / table catalog. Here it is created, placing the FILE in the name, MSLINK (with a capital letter) in the primary key and an alias, in this case FC. Then Commit. With this, we are ready to flirt.

MSLINK

He calls

The object will be linked to a field in the table plug, Through the Mslink As primary key and based on a coincidence with the column Key_file.

There must be a unique match between the object that will be linked (suppose the card number in the map) and an identifier in the pattern. It may well be the file number or cadastral code, but it should not be repeated on the same map.

MSLINK To switch on, a fence, then Database / text manager. We leave on only the number of the card number, to proceed to the link. Then we choose the name of the table where we want to link and the column that contains the match. In this case, the Tab table and the column Key_file.

We activate the option Use Fence, We choose the button Join And click on the screen.

  • Ready, MSLINK Gegraphics searched for all those fields of the tab number on the map, which matched the database tab number in the table plug And column Key_file. And he made a link through the Mslink existent in that column. The way to test it is by using the command Review attributes, You should lift the associated table.
  • To update Area and perimeter, the levels or Features of property boundary and apple, and centroids. Then it is done Database / area perimeter u
    ddate
    .
  • To update coordinates, Database / coordinate update.
  • Insertion Is to create a new record in the database, Update To make an update.

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 that developed some sector of our brain. The Geospatial Administrator Also has its flats.

Leave an answer

Your email address will not be published.

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