Geofumed – GIS – CAD – BIM resources

Draw a polygon with bearings and distances from Excel to Microstation

A few years ago I published an article that showed how to concatenate data in Excel for build a traverse with AutoCAD, Without having to do the whole protocol:

@distance

The other day we were in the AutoCAD course someone asked me if that could be done with the Microsation command line. The answer is YES, you just have to understand that Microstation's Keyin is not the same as the AutoCAD command line. Let's see how it can be built, in passing we learn little things little used in this program:

The box on the right is an example of a traverse based on bearings and distances with the following structure.

Box of bearings and distances autocad microstation

With Microstation you can draw this as i explained before, With the obvious disadvantage - and the same one of AutoCAD -, that it is tedious to be writing one by one, the possibility of being wrong and even that the previous course is not reset.

 

microstation directions

 

Well, the process of concatenating is just the same that I explained with AutoCAD, you just have to understand something in which Microstation differs.

The keyin was not built based on making commands on text lines but for calling commands with object orientation, so it only supports 56 characters. Additionally, it requires that a semicolon (;) be used to separate the commands because, unlike AutoCAD, which comes from a Basic programming logic, it brings a Clipper logic with what Microstation was made there when it was still called Ustation.

Given this, the easiest way is to call the orders from a text file with the @ command, which I think very few know but which is the procedure that Microstation has always used to process batch orders. Including the import points from a txt list is an mdl that does this.

 

Using the Excel sheet I previously worked on to teach how to convert from bearings and distances to coordinates, I will show how it would concatenate for Microstation:

Concatenate the points.

What interests us is finally, that the Key in final be:

Place point ;Xy =374037.736,1580735.145;

Place point is the command point, including the space, the semicolon is to indicate another order, the xy = is the order to enter coordinates and the two coordinates blue and green are the known points. At the end a new semicolon to indicate a enter or go to new command.

So, assuming the cells of my interest are in U7 and V7 to concatenate would be:

=CONCATENATE(“Place point ;”,”Xy ="U7,””,”,V7";")

Box of bearings and distances autocad microstation

This way, I just copy the contents of column AA into a txt file, which I'm going to call Spikedpoints2.txt. I suggest they put it directly in C so the path is not so difficult.

In this case I am placing it in my documents, the path would be: C: \ Users \ User \ Documents \ pointsandfrom 2.txt

To run it, we activate the command line window (Key in), this is done from Utilities > key in and then we enter the command:

@C: \ Users \ User \ Documents \ DottedPoints2.txt

We do Enter, and there you have it, the points drawn in their order. It is convenient to have a thick line thickness for them to be displayed.

 

Box of bearings and distances autocad microstation

Concatenate the lines.

For this, the operation is similar, the command that we must execute is Place line, Additionally we indicate that the line has a point of origin and a point of destination.

Place line ;Xy =374032.234,1580716.255;Xy =374037.736,1580735.145;

=CONCATENATE(“Place line ;”,”Xy =“,U6,””,”,V6,”;”,”Xy =“,U7,””,,V7,”;”)

We copy and paste to the txt file, save and run again

@C: \ Users \ User \ Documents \ DottedPoints2.txt

And there they have it:

Box of bearings and distances autocad microstation

 

And an additional advantage is that building the box of bearings and distances only requires doing Copy in Excel, and Easter in Microstation. With paste special you can choose between being an image, an embedded or linked spreadsheet

Box of bearings and distances autocad microstation

directions to microstation DownloadsTo complete the article, I am having the file in Excel as an example, in which they only have to change the point of origin, directions and distances and the template can be useful for any iguana with more than half a pound of ribs.  Also here the sample txt.

It requires a symbolic contribution for the download, which you can do with Credit card or Paypal.

14 comments

  • Geophysical September, 2020 at

    Send me a file example and what you want of the application to Editor@geofumadas.com

    Regards

  • Michael September, 2020 at

    Kas teie Trimble ja PowerDraft vaheline expot / import ja koodide mkm programmi teete?

  • Nacho Vergara Galiano March, 2017 at

    he does not let me do it, in Microstation he tells me command of acquaintance input

  • sergio October, 2015 at

    Hello!!! Friends wanted to ask them, I am needing the autocad program 2015.el mdt 6 or if you can facilitate me to intarlar.grasias.

  • Geophysical April, 2014 at

    Works with any version of AutoCAD

  • Migafia April, 2014 at

    Can anyone tell me if the exell template to draw polygons with autocad, is compatible with any version of autocad or civil 3d?

  • Eduardo Henriquez December, 2013 at

    Dear friend, I received the file that I requested, thank you very much !!

  • Geophysical December, 2013 at

    It's in your mail, it checks the spam folder, sometimes it goes there.
    If you have problems let us know

    Editor@geofumadas.com

  • Eduardo Henriquez December, 2013 at

    Messrs senvie the money by Pay Pal but I can not find the way to let me download the Excel file for microstation

  • g! September, 2012 at

    There are lisp routines that do this in AutoCAD.

  • Jaime..CO September, 2012 at

    How can I do it so that you can at least make some exclusion, send it to my email, there are people who find it very difficult to get it by paying… .thank you and I am very grateful…

  • g! December, 2011 at

    In the page of downloads of this web there is a sheet that allows you to draw points from coordinates in Excel

  • CARLOS GOMEZ December, 2011 at

    HELLO AS AND COMBIERTO THE CORDENADA OF A SHEET OF EXCEL TO AUTOCAD MEGUSTARIA TO MAKE IT THE AUTOCAD MIO IS 2007 THANKS

  • Victor rivas October, 2011 at

    also in autocad you can in mdl ………… ..

Leave a comment