Questions similar to this appear on the Bentley Discussion Groups. This appeared in the VBA discussion group.
Q You want to be able to load maps in response to a user-supplied datapoint in MicroStation® GeoGraphics™. You are looking for answers to questions like this …
A First, let's be sure we understand how GeoGraphics knows about maps and their extents.
When you register a map with GeoGraphics, you define a map extent and associate the extent with the map ID.
That's one of the administrative tasks in setting up a GeoGraphics project.
The map ID is the MSLINK value in the maps database table.
It is likely that, unless your project is very simple, multiple maps will surround a query point. You need to build a list of map IDs.
A map extent can be defined in two ways …
index.dgn)
If a map is irregular in outline, then it makes sense to use a shape in the index file. The index file is a DGN file containing a number of shapes. Each shape circumscribes a map, contained in another DGN file. That is, if you were to attach a map as a reference model to the index file, you would see a shape surrounding all the graphics elements of that reference.
You need the outline shape to register a map.
You can either draw the outline yourself, in index.dgn,
or let GeoGraphics project setup generate it for you using the map registration wizard.
The shape in the index file has a database linkage.
The MSLINK value is the ID of the map.
If you want to find the ID of a map having a shape in the index file, then your approach would be …
If a map is regular in shape (i.e. a square or rectangle), then it's preferable to use the database. When storing the map extent in the database, you don't need a shape in the index file. It's better because …
The map extent coordinates are stored in MicroStation units-of-resolution (UORs) in the maps table
columns (xlow, ylow) and (xhigh, yhigh).
Your approach to obtain a map ID when map extents are stored in the database would be like this …