Ths article first appeard in the Client Server in 2008.
By Jason Gingrich, Technical Support Analyst
In CADscript, the MapIndex tool is used to produce grid index lists for locations on maps. When you use MapIndex, an area is specified on a map, grid units and divisions are defined, and the area is scanned for text or symbols associated with text. A text file is then produced containing the locations to be included in the DGN as an index table.
Suppose you have a file containing text elements and you want to generate a map index for the file.
Go to CADscript > MapIndex to bring up the MapIndex dialog. Click New and a listing for New Grid appears in the dialog.
Select the new grid listing and click Edit to bring up the Edit Grid dialog. Here you can change the title and description of the grid created. You can also set the location of the grid, show or hide the grid, edit the grid labels, scan locations, and check the locations.
However, you first need to edit the settings of the grid you are going to create. Click Edit Grid Labels and the Grid Output Options dialog opens.
There are three types of output: X-Y Grid Reference (street directory style), UTM Style Coordinates, and DDD°MM'SS". Use the X-Y Grid Reference for this example. Set the number of columns and number of rows you want in your grid along with what to start each with. For example, start the columns with the letter A and the rows with the number 1. Set the direction you want the rows to be numbered: Up to have 1 at the bottom of the grid or Down to have 1 at the top of the grid. Click OK to get back to the Edit Grid dialog.
The Grid Reference and Region Selection Options are optional settings you can use, but are not used in this example. Refer to the MapIndex section in the CADscript help for information on those settings.
Now you are ready to place the grid. Click Set Location. Click in the file where you want the bottom-left corner of the grid to be and then click again where the top right of the grid will be. Next, in the Edit Grid dialog, click Show Grid to see the generated grid.
Now you need to scan the text located in the grid.
In the Edit Grid dialog, click Scan Locations to open the Scan Options dialog. Notice that your grid no longer displays onscreen. It only displays while in the Edit Grid dialog after you click Show Grid. Once you close this dialog or go to another menu, it no longer displays. If you want to have a permanent grid, use the appropriate MicroStation tools to draw the grid in the file.
Here you can make settings to scan text elements on certain levels, heights, colors, or by placing a fence. You can also set the point where the text will be placed. Use Text Center and the location point for all text will be the snap point of the text that is located at the center of the text. See the MapIndex section of the CADscript help for information on the other settings.
Click Scan, and MapIndex reports the number of new elements scanned. In this example, it reports, "4 new elements scanned." Click OK to get back to the Edit Grid dialog and then click OK again to return to the MapIndex dialog.
Now you can generate the index text file. Select your grid in the menu and click Build Index. Save the text file to the desired location. You can then open this text file in a text editor for reference, or you can import the text using File > Import > text in MicroStation and click in the file where you want the text to be placed.