Smaller text size Reset text size Larger text size
skip navigation
NHDOT Home CAD/D Home MicroStation MX v8i OpenRoads Downloads
CAD/D Home > MicroStation > MicroStation Macros

MicroStation Macros

BASIC Macros

A number of macros have been created for use in MicroStation.  Descriptions of some of the more useful ones are listed below.  BASIC macros can be run by selecting Macro, then MicroStation BASIC from the Utilities menu.

CurveData

Replaced by a VBA program.

delpoints*

Used to delete zero-length lines ("measles").


delpt*

Used to delete zero-length lines ("measles").


linestysc

Used to change the scale of all linestyles on the drawing.  A dialog will display prompting you for the scale. Enter a scale and click on Ok. Click cancel if you would like to exit the macro without changing the line styles in your drawing.


measure3d

Used to measure distances.  This macro takes 2 data points from the user and calculates horizontal distance, vertical distance, slope distance and slope between the points.  The basis for these calculations - horizontal is considered in the x-y plane and vertical distance is the difference in z coordinates.  Be sure Active Depth is Off.


pnt2cel

Used to replace points with a cell.  Primarily for shape file imports that contain points.  First bring up the cell selector and select a cell to make it current.  Next use Element selector or define a fence to select all the points to be replaced.  Run the marco by selecting Utilities-> macros -> basic macros and select pnt2cel and run.


Slope and SlopeSet 

Used to add slope text to profiles and cross sections.  This macro measures slope between 2 data points and issues the place text above command to label the slope.  
  • The text settings must be set before running the macros.
  • slope settingsSlopeSet macro must be run first.  Change the settings for format (generally either option 4 - x:1 or option 2 - x%) and precision [0 (0), 1 (0.0),2 (0.00) etc.).  Here the vertical exaggeration for profiles can be set also.
  • Now run Slope macro.  Choose 2 points and hit on the element (the macro issues the Place Smart Line command - but this is just a temporary line that the macro deletes).  The macro will center the text above the element.
  • The Slope macro has to be invoked again to label the next slope. (The SlopeSet macro only has to be run once per session unless you need the format or precision changed.)
  • Note: If you receive error 1102 (Execution failed at line 40), two things could have happened.
    1) Check your preferences - Workspace -> Preferences -> Look & Feel. The default tool cannot be set to None.
    2) This can happen if you try to start the macro while it is already running. That can happen when using qa_input on cross-sections if you don't realize that the rule starts the program.

Station-Offs

This documentation describes a set of routines developed by Rowse Company  (now ProSoft) to:
  • plot a cell at a specified station and offset
  • annotate a bound or property corner
  • give the station and offset of a selected point

See Station & Offset Programs for more detail.


xdelem

Used to exchange a Reference file to the Active file.  This macro prompts the user to select an "object" or element on the Reference file that is to become the Active file and Accept.  If there have been any changes to the Active file, the user will be prompted to either save or not save the Active file changes before the macro exchanges the Reference file to be the Active file.  This macro is also found as Function Key - Shift F7.  At this time, xdelem will not work if the NHREF macro has been executed to attach reference files.
* - Yes, the delpoints and delpt macros appear to do the same thing.  We don't know which one works better - so until we have good test case - we will keep both.

Related Pages

MicroStation Programs

MX Add-In Index

MX Macro Index

MX Wizard Index

 





New Hampshire Department of Transportation
PO Box 483 | 7 Hazen Drive | Concord, NH | 03302-0483
Tel: 603.271.3734 | Fax: 603.271.3914

Copyright 2014. State of New Hampshire