Geofumed – GIS – CAD – BIM resources

Export coordinates from CAD to txt

Let's assume that we want to export points from CAD format, to a comma separated list so as to upload to a total station and do a site stakeout. Previously we had seen how to import them from excel or txt With AutoCAD y With Microstation, Now let's see how to export them.

There are different ways to do it, such as counting the cows, you can count the legs and divide them by four or you can just count the cows. Let's look at some ways:

1 Doing it with Microstation (dgn to txt)

In the example, I have a plot that has five vertices, and I need to export the coordinates to a txt file.

For this, I have put the points in a thickness that are visible. Remember that line weights in Microstation are dynamic, so they are immediately noticeable.

Dgn to txt

First step: Activate the coordinate export tool (if it is not active), for this we select

tools
Tool boxes
We activate the last command (xyz)
Then we closed the panel and should have been activated this way

Xyz dgn

Second step: Select the points we want to export, then select the “export coordinates” command, which is the up arrow, and fill in the conditions:Export coordinates

-Data file
-File name
-Order of coordinates
- Primary units
-Decimals
-Separator
-View
-Prefix / suffix
- Initial number

The panel allows you to choose the options, if only the selected drawings (single), the drawings inside a fence or all the file (all)

The end result is a .txt file that you can open from excel.

In my case I have assigned number, marking the checkbox that is on the right

In case the file already exists a window that asks if you want to replace or add (add or append) is displayed.

Txt coordinatesTo identify which are the points, microstation draws you numbers in each point, with the color, type of line and size of text that you have active.

2 Doing it with AutoCAD

Before knowing CivilCAD (Softdesk) we used a DOS application that is still there called Dxf2csv. You can try it if you like to torture yourself with nostalgia, 🙂 there are also some apps”not free“, and I'm sure there must be some free but in this case we will see how it is done with Softdesk8, it is similar in CivilCAD.

In order to make the points visible, I have changed the format with format/format point/ point style. In order for the thickness of the lines to be visible, you have to activate “Lts”, using a value less than 1 until we see the difference.

Dwg to txt

First step: Open a project or create a new project

AEC
Softdesk programs (save file first time)
Create project
Assign project name, then ok
We choose the number where the numbering begins
Ok ok, ok then
we choose “cogo”, then ok

Second step: Enter the points to the database: for this, there are different forms, in this case we will do it automatically: Points / set points / automatic, then select each line of the polygon.
The signal that were entered is to make points / set points / list avaible points. It should show +6, which means there are already 5 points entered into the database.

Third step: Export the points.
To export the points we do:

-points / import-export points / export points to file
- Select the export format, in this case PNE (point, northing, easting)
-We choose the destination folder of the file and write the name
-In the command bar we choose the export options (by selection, by rank ... in this case we use all, all)
-List, the file has gone, in this case separated by expacios but equal can be opened with excel

Autocad txt

In case the points are written in too large sizes, you have to change the metric units because by default come the English (AEC / setup drawing / unit angles / choose métric)

This time the points did not have elevation, that subject we will see in another post, when we speak of curves of level.

Tolerate my insistence, does anyone know a macro for atocad that is simpler and free?

Does anyone else do it?

18 comments

  • g! May, 2012 at

    For that, you need CivilCAD or Civil3D. Both are specialized modules that work on AutoCAD.
    AutoCAD alone does not allow you to do that.

  • Elementary proficiency May, 2012 at

    apologize for my initiation, I need to know how to pass and / or draw cuts or section in autocad directly with reading height and distances (track width) each 20 mt. longitudinal and at the same time I go calculating the volume of fillings and excavations directly in autocad

  • Cyc February, 2012 at

    good this post is excellent there are many support tools to simplify the work and it would also be good to rely on civilcad that is very practical to use, but the important thing is to know the origin of each concept

  • g! August, 2010 at

    Try with This other application

    also There is XYZ-DXF Which is the best

  • Francisco javier alanoca March, 2010 at

    Good steps keep teaching us

  • g! November, 2008 at

    Hello Kovos in this post We explain how to do it with Softdesk8. I commented that we can not through this blog recommend ways to acquire pirated software, in this post I mentioned that Vuze It works for that, but it's at your risk.

  • Kovos November, 2008 at

    How do I draw the level curves in Aautocad? How do I download the softdesk8?

  • g! April, 2008 at

    Hello Jorge Luis

    First, in the total station, it exports the points to .txt format, preferably in order: x coordinate, y coordinate, elevation, description.

    Then open them with Excel, choosing the file of type .txt

    Choose the option delimited by commas, so you can separate the columns

    To have them in excel I recommend that you use this tool, Which exports excel to dxf

  • jorge luis April, 2008 at

    I need the steps to be able to export the station points to excel… Thanks

    Urgent

  • g! January, 2008 at

    Well Daniel, this was the only one I could prove that works, is a VBA but interacts with Excel on the fly

    http://geofumadas.com/cuadro-de-rumbos-y-distancias-en-excel-interactivo-con-microstation/

  • DANIEL BARRIOS January, 2008 at

    I would appreciate it, please. It is for my thesis and I only have to do this to advance and culminate. THANK YOU.

  • g! January, 2008 at

    Daniel, let me find a vba I used some time ago and upload it for you to try

    Give me this day

  • g! January, 2008 at

    No, that only serves you to import points.
    I'll get a vba and I'll upload it for you to try.

  • DANIEL BARRIOS January, 2008 at

    ¿¿¿¿HOW DO I DO TO IMPORT THE COORDINATES FROM EXCEL TO MICROSTATION AND DRAW MY LINES; THROUGH THE TOOL BOXER APP> XYZtext> IMPORT COORDINALES ???????

    IS IT SAY HOW I USE THIS APPLICATION TO IMPORT ???

  • DANIEL BARRIOS January, 2008 at

    GOOD DAY, GALVAREZHN

    Thanks, but my case is this:

    I have a database in Excel where I have the origin coordinates and destination coordinates, and I want it to draw the lines in autocad. “””BUT””” Without copying and pasting, but rather the operation is automatic, that is, with a macro or some code to create the interface, or perhaps within AUTOCAD or MICROSTATION THERE IS THAT INTERFACE that imports data from excel AUTOCAD or MICROSTATION if it is the case

    You suggest me galvarezhn
    ??????????? THANK YOU

  • g! December, 2007 at

    Hello Daniel, the same procedure explained here

    http://geofumadas.com/como-importar-puntos-de-excel-a-autocad/

    It works, but instead of activating the point command
    Activate the command line, or pline
    Instead of placing the points you will draw a line

    regards

  • DANIEL BARRIOS December, 2007 at

    I am a THESISIST and I am looking for how I can automatically draw lines in AutoCAD from a database in Excel, that is, having the coordinates ORIGIN and coordinates DESTINATIONS

    BUT I DONT DRAW POINTS BUT LINES DIRECTLY IS SAYING POINT ORIGIN AND VARIOUS POINTS DESTINATIONS
    THANK YOU

  • Links November, 2007 at

    This lisp can do it

    (Defun c: txt-xyzs ()
    (Setq a (ssget)
    N (sslength a)
    in 0
    f (open (getstring “\nfilename: “) “w”)
    )
    (Repeat n
    (Setq name (ssname ai)
    Ent (entget name)
    Tp (cdr (assoc 0 ent))
    )

    (if (= “TEXT” tp)
    (If (and (= (cdr (assoc 71 ent)) 0) (= (cdr (assoc 72 ent)) 0))
    Progn
    (Setq ip (cdr (assoc 10 ent))
    X (rtos (car ip) 2 2)
    And (rtos (cadr ip) 2 2)
    Z (rtos (caddr ip) 2 2)
    S (cdr (assoc 1 ent))
    )
    (princ(strcat x", "y", "z", "s"\n") f)
    ); Left-justified text
    Progn
    (Setq ip (cdr (assoc 11 ent))
    X (rtos (car ip) 2 2)
    And (rtos (cadr ip) 2 2)
    Z (rtos (caddr ip) 2 2)
    S (cdr (assoc 1 ent))
    )
    (princ(strcat x", "y", "z", "s"\n") f)
    ); Other than left-justified
    ); If
    ); If

    (if (= "MTEXT" tp)
    Progn
    (Setq ip (cdr (assoc 10 ent))
    X (rtos (car ip) 2 2)
    And (rtos (cadr ip) 2 2)
    Z (rtos (caddr ip) 2 2)
    S (cdr (assoc 1 ent))
    )
    (princ(strcat x", "y", "z", "s"\n") f)
    ); Left-justified text
    ); If mtext

    (Setq i (1 + i))
    ); Repeat
    (Close f)
    )

Leave a comment