CAD/D Macros & Utility Programs

There are two programming languages used for development in MicroStation Connect and OpenRoads Designer, VBA & MDL.

VBA programs can be run by selecting the desired Macro from the dropdown list on the Utilities tab and clicking the Play button.  A list of available programs will be displayed.  If no macros are listed, you may not have selected the NHDOT workspace before opening the drawing.
MDL programs can be loaded by selecting MDL Applications from the Utilities tab.

Attach2010Aerial | Attach2015Aerial | Cell Tools | ManageUserPreferences | NHRef | Rotate Cells / Text | Sign Footing | SlopeSet | Station-Offset | Steel | Zero2Cell


 

Attach2010Aerial

Used to attach raster files of aerial photos to the active model.  2010 aerial photo files are available in SID format. This is denoted in file names by a "sid" file extension.  Note that these files are only available to internal NHDOT operators. Consultants working on NHDOT projects who wish to have copies of the images in the area of their project should download them from GRANIT.  Visit NH GRANIT Available Layers for more information.

To see which files are available in your project area, attach aerial2010_mr-sid.dgn as a reference file. Be sure to select the Coincident-World orientation when attaching this file.  Files available for the desired area will be delineated with a rectangle and includes the corresponding file name text inside each.  For example: 0900002250 refers to the 0900002250.sid file.

The macro locates and attaches the desired aerial photos based on the file names selected. It may take some time for the images to display.  Be aware that that every raster file attached will land on the Active Level.  There could be value in attaching different raster's to different levels in order to gain Level Display control.


Attach2015Aerial

Used to attach raster files of aerial photos to the active model.  2015 aerial photo files are available in JPEG-2000 format. This is denoted in file names by a "jp2" file extension.  Note that these files are only available to internal NHDOT operators. Consultants working on NHDOT projects who wish to have copies of the images in the area of their project should download them from GRANIT.  Visit NH GRANIT Available Layers for more information.

To see which files are available in your project area, attach aerial2015_jp2.dgn from the statewide drawing folder as a reference file. Be sure to select the Coincident-World orientation when attaching this file.  Files available for the desired area will be delineated with a rectangle and includes the corresponding file name text inside each.  

The macro locates and attaches the desired aerial photos based on the file names selected. It may take some time for the images to display.  Be aware that that every raster file attached will land on the Active Level.  There could be value in attaching different raster's to different levels in order to gain Level Display control.


Cell Tools

The CellTool application provides some useful extensions to MicroStation’s standard cell placement tool. CellTool gives you the ability to: 

  • Place Active Cell with an interactive rotation angle
  • Place Active Cell on a selected element with interactive rotation angle
  • Place Active Cell on an element by partially deleting the target element to fit the cell.
  • Place multiple copies of the active cell along or offset from a selected element at a given distance between each copy.

Cell editign toolbar
Cell Tools

Detailed documentation is available on Bentley's Communities website.


ManageUserPreferences

This macro is used to backup your current user preference settings, restore previously backed up settings or reset your user preferences to the NHDOT default values.

VBA macros are accessed from the Utilities tab.  

Select ManageUserPreferences and click Play.

Manage user preferences  

A dialog box will appear with three options:

Manage user preferences

  • Replace with Seed Files will copy the seed files associated with the version of MicroStation or OpenRoads Designer that you are using to the computer you are working on.
  • Backup to N Drive will copy the files associated with the version of MicroStation or OpenRoads Designer that you are using from the computer you are working on to a location on the N drive.
  • Restore from N Drive will copy the files associated with the version of MicroStation or OpenRoads Designer that you are using from the N drive to the computer you are using.

NHRef

See the NHRef page for details of this macro.


Rotate Cells / Text (EnvisionCad)

This tool is intended to rotate Text (Cells) to the View Angle.  So first rotate the view along the roadway.  In a 3D model rotate by 3 points.  Hit all points in space so they get the same elevation, the first 2 define the rotation, the last point hit above the other two.  Return to Top rotation and re-rotate if you hit on an element and tilted the plane.

Use Element Selector to drag box around cells or text you want to rotate.  Click on the A Rotate Text tool and use the following Settings - Rotate by Angle, Reverse View Angle - uncheck/check to update view angle, Absolute, check Rotate entire Cell, click Update to Rotate them.   Note that poles on the bottom side of the roadway will need to be selected again.  In the Tool add 180 to the Z Rotation value and then Update. 

EnvisionCad text tools
EnvisionCad Text Toolbar

Additional Information


Sign Footing

See the Sign Footing page for details of this macro.


SlopeSet Dialog
SlopeSet Dialog

SlopeSet

Used to add slope text to profiles, cross sections and typical sections.  This macro measures slope between 2 data points and places text at a selected location.  Note that text will always be placed along the X or Y axis regardless of drawing rotation.  The active settings (level, color, style, etc.) will be used.

The text can be formatted as either a percent slope (%) or ratio (x:1).  

Select the number of decimal places for the text.

The exaggeration option would typically be set to 5 for profile slopes since our profiles are usually drawn at a 5:1.

Text can be placed vertically (along the Y axis) by checking the Vertical Text box.  

Click the Annotate Slope button after adjusting settings.  You will be prompted to select the two points and then a location for the text.

 


Station-Offset (Ohio DOT)

See the Station Offset page for details of this macro.


Steel

The Steel toolbox has two icons, ‘Place Steel Section’ and ‘Steel Section Parameters’. Clicking on place steel icon will start placing a steel section. The steel section is chosen in the Tool Settings dialog. Additional placement parameters are in the Steel Section Parameters dialog, accessible using the Steel Section Parameters Icon. 

Detailed documentation is available on the Bentley's Communities website.


Zero2Cell

Used to locate zero length lines and place a cell at that point. It is primarily used for shape file imports that contain points.  

First select an area containing the zero length lines.

Use the keyin vba run Zero2Cell [cellname] [scale] substituting the name of the preferred cell for [cellname].  The [scale] is optional.  If no scale is specified then the Annotation Scale will be used.

If the cells are not readily visible, select the cells and check that their Is Annotation property is set to True.