MicroStation Tip: Automate Coordinate Entries

Written by Rod Wing

For those of you who have had to do a lot of coordinate entry in MicroStation, either through the key-in browser or using AccuDraw, you know what a chore that can be. You can use Excel and Notepad to create a MicroStation script file to make that job much easier.

In this example we have a parcel boundary from a legal description. We are given the start point Northing, Easting and the Distance and Bearing for each subsequent point. Even if you do not receive the coordinate entries in electronic format and have to re-key all of the values you may find this method easier than trying to key them directly in MicroStation.




The first step is to format the coordinate data. The Northing (Y) and Easting (X) values have been transposed to the be in the traditional X,Y order. Then the direction/bearing values are edited so they are in a format MicroStation accepts. Simply use the Excel Replace tool to edit all the values at once.



The next step is to insert a column at the beginning of each line for the MicroStation key-in command. In this case the first coordinate will use the MicroStation XY= key-in to place the point while the subsequent points will use the MicroStation DI= key-in to use the distance and direction values. Adding the command column in Excel it is easy to copy and paste the command key-ins.



Once this formatting is completed in Excel we export the data to a .csv file. Using Notepad we can complete the formatting. The first step is to comment out any non-executable lines by placing a # at the beginning. Then we replace the first comma with an = so that it matches the MicroStation key-in syntax. Using the Notepad Replace tool makes this very easy.


Now that coordinate key-ins are formatted correctly we add the MicroStation tool command(s) with which we want to place the coordinates. In this case we start with the Place Smartline tool and enter a Reset when completed.



Finally, save the text file and open MicroStation. In MicroStation we open the Key-in browser and run the script file. The @ character followed by the full path to the script file will execute commands in the file.




Last month’s tips:

Locks   7-1-2014 10-25-37 AM      Options Layout Regen       1
MicroStation: Key                   InRoads: Horizontal                  AutoCAD Civil 3D:                    VBA: Message Box 
     Point Snap                               Geometry working …                 Improve Performance…                  Buttons
Don’t want to miss out on other great information? Subscribe to this blog or our monthly eNewsletter now!
Learn More ◊ Contact us today ◊ Newsletter ◊
EnvisionCAD Group EnvisionCAD YouTube Channel   
Rod Wing

Rod Wing

Rod joined EnvisionCAD in March 2007 and has nearly three decades of experience working in the CADD industry. He led the IT evaluations of Bentley InRoads and AutoDesk Civil 3D at Wisconsin DOT in their overall CAiCE replacement evaluation. He also led the MicroStation V7 to V8 upgrade effort at Wisconsin DOT which included updating not only the CADD standards to accommodate the changes in the file format but also updating legacy MDL and macros to work in the new environment. Rod received a Bachelor of Science degree from the University of Wisconsin in Cartography and a Master of Science in Geographic and Cartographic Sciences from George Mason University. Rod has extensive experience in CADD as well as the areas of GIS, cartography, plotting, scanning, raster editing/manipulation, publishing, and file/data translations. In all of these areas, he has produced custom tools and developed workflows to enhance productivity between diverse sets of applications. He instructs MicroStation classes ranging from fundamentals to advanced applications.


2 comments on “MicroStation Tip: Automate Coordinate Entries

  1. Guy Ladd Reply

    Hi Rod,
    Great Tip!!
    I’m assuming you can also use the automate coodinate entries for creating a long highway baseline that have distance/bearings for tangent lines and radius/delta for curves? What would be the key-in for changing from tangent to curve and back to tangent? Do you have an example of how the spreadsheet or text document would look like?

    Maine Department of Transportation

  2. Bob Mecham Bob Mecham Reply

    Hi Guy, I did some checking and couldn’t find an easy solution for working with arcs based on Radius and Delta. If you knew 3 points on the arc you could try the keyin “place arc center constrained;xy=?,?,?;xy=?,?,?;xy=?,?,?” Otherwise I would look at InRoads or Geopak to help you out with scripting out a baseline alignment. Maybe someone else has a better idea.


Leave a Reply

Your email address will not be published. Required fields are marked *