You are currently reviewing an older revision of this page.
Users of Bentley Map often ask how they can generate text labels for their features containing LAT/LON coordinate values based upon the currently active geographic coordinate system. Users sometimes want to place the labels interactively (such as the deprecated LABEL REFERENCE command) or automatically generate them along side or above certain XFM point feature instances.
To assist users in generating these LAT/LON coordinate labels, the label_latlon2.mvba Bentley Map example VBA application is available in the files section for download here.
To use this tool, simply place the provided label_latlon2.mvba file in any folder which is referenced by the MS_VBASEARCHDIRECTORIES configuration variable and enter VBA RUN [label_latlon2]Module1.main which loads the following dialog…
…and allows processing of feature instances of a given feature class using file, fence or selection set input. Alternatively, enter VBA RUN [label_latlon2]Module1.placeLatLonLabel to start the “Place Label(s) Interactively” command w/o displaying a user interface. Please note that during interactive placement, the user can toggle the display of dynamics by simply pressing the Reset (right mouse) button.
Placement of all labels use the currently active element settings (e.g. color, weight, style, level, font etc…) as well as the currently defined “Angle Readout” settings as shown in the following:
This example Bentley Map applicatiion has been developed using VBA so that it can be easily modified by anyone requiring similar functionality.