From Excel to AutoCAD, summary of the best
Well, I must admit that it has been fun talking about this subject, so in this post I want to show the best we have found.
- We saw that Microstation Has integrated The functionality to import directly from a txt file
- We also saw how Do it with AutoCAD
- We saw how Export from AutoCAD o Microstation to csv or txt
- Then we saw how to use the command concatenate In case of having bearings and distances in excel
- And we saw a VBA application for Microstation that works in both ways
But best of all was to learn from someone who in his comments told us about this tool that allows from an excel file to generate a dxf file, using the coordinates of x, y, z, an identification code and the level where We want it to be drawn.
The application is called XYZ-DXF and you can download it here;
Let's see how it works:
1. The data of origin:
This application is appropriate for information downloaded from a gps or total station, as long as the coordinates are UTM, it means that its units in a Cartesian plane are in meters. The code column is an identifier of the point, then the x, y, z coordinates and finally the layer in which we want them to be drawn, these can be, for example, street axis, trees, boundaries, polygonal or any characteristic that later allows us filter the data in AutoCAD or Microstation.
* All points must have code.
* All points must be entered one after the other, without leaving blank rows.
Thanks to Juan Manuel Anguita, a Topographer from Jaén, Spain who put in the effort to build this macro. The Excel file has three sheets, one of them called Preview allows you to see the graph in plan view, and side views (built to pure Excel graph!). Also each of these 9 quadrants can be viewed, in case of changing data in the table the "update views" button is used
Configure data for export
The third sheet called options, allows you to define whether the file to be exported will go in two or three dimensions, the size of the letter, if we want the elevations (dots) and the name of the dxf file to be displayed.
Once the purple button is pressed, a .dxf file is created, which can be opened with Microstation, Arcview, AutoCAD or almost any CAD program. In this, a layer is created for each different text found in the 'Layer' column (eg: lev), where the points will be; There will also be another layer whose name will be the text of the column 'Layer' + txt (ex: levtxt), where the codes will be, and another will be created, where the dimensions will be, with the name 'text of the column 'Layer' + dimensions (ex: levcotas). An excel file with the same name and in the same destination is also created.
The destination file (dxf)
This is the example of the file viewed from AutoCAD. Then you can change the colors of the layers (format / layers) or the point format (format / point styles).
It is simply an impressive application, for how useful and simple it is to handle. It doesn't draw lines, it just sends points.
With only AutoCAD, that is not possible.
You could, if you import the table as a database in AutoCAD versions like Civi3D.
Or if you make a macro with AutoLisp that gives the table.
I appreciate you could help me with a search of texts in autocad of an excell table, find them and change the color, I hope you can, greetings.
EXCELLENT!!!! THANK YOU..
I get error 1004 at runtime….
Sincerely bad this macro is incomplete since it is not allowed to use multiple times, tn only once and this makes it a mediocre or maybe not used but tried to create several files but says that the file is being used by another program ????????
Hi Juan Manuel
I was looking for information to do a project that I have in mind and I found this file.
Well I'm not really an expert in progaramtion, but I have the idea of craer automation of the geometric design of roads through the visual basic editor of excel.
The objective is to calculate the geometric elements of the different curves and those values that I obtain as xls, convert them to an ascii format to execute them in a cad and microstation platform.
And that's where I can not continue, I do not know how to do it. From what I see you have a lot of idea and maybe you can help me
I would also like to craer a craer code by which you can visualize the curve in an excel chart before exporting the data to different platforms.
For your attention, thank you.
You must use AutoCAD map or Civil 3D for this.
If you do not have it, use an opensource program like QGis or gvSIG
I know it does not have to do exactly with this topic, but if someone can guide me on how I can export autocad files to KML and put drawings on gmaps.
Thanks and best regards
It does not work, it tells me that I have to debug
THANK YOU SO MUCH FOR THE MATERIAL BUT ONLY RUN ONCE, AS I COULD DO TO BE REUSABLE EITHER IN EXCEL 2003 OR 2007 I ALSO HAVE SOME FORMATS OF EXCEL TO AUTOCAD BUT WITHOUT WINS
anyone can help me
Very good contribution!! I just need you to read more than 1000 points, I see that it is protected ... I have managed to get the points up to 950, however I have coordinates of more than 5000 points ... unfortunately it tells me protected with a password .. But excellent contribution! I hope the author sees this and can increase the number of points to be able to enter ..
Greetings to all!
Thank you very much for providing such an excellent application. I was very relieved by the work, a query: Is it possible to associate at each point a block, for example a circle? If so, could you tell me the way.
From already thank you very much
Good excel, this functionality of excel sheet, question according to the tests that I have done is limited the amount of points to graph, in my case I need to make graphs near 4000 points, how can I do to modify this excel table dynamics since It would take me too long to be plotting in sections.
I SEND YOU MY SINCERES CONGRATULATIONS TO THE AUTHOR, IT'S A GREAT HELP FOR THE TOPOGRAPHERS, I HOPE TO FOLLOW RECEIVING THIS TYPE OF TECHNICAL AID TO DEVELOP ME IN A MORE PROFESSIONAL WAY IN THE FUTURE.
Douglas ... in AutoCAD you just have to give file open
In filetype selleccionas dxf
Select the file that was generated in C and
If it works in 2007, when opening the file it shows a security warning, you must choose in
Enable this content and
If you are referring to the Excel file shown in the example, once you have entered the coordinates, press the purple button with yellow text: “press to create dxf”
I want to know how to transport the data from the table in excel to autocad, what is the command to use.
I would like you to help me ... I am trying to find an application or routine in lsp. With which you can export texts from .dwg to .xls only texts that you select with the mouse and at the same time being able to enter data with the keyboard in case there is no text in the drawing. and that the exported texts are not selected if it does not allow me to select it as many times as necessary.
I have this routine
(Defun C: TXTOUT (/ va vb vc vd ve vf vg); V1.0
; By Scott Hull, 11-20-86
; SAH Mechanical Design (415) 343-4015
; Exports ASCII text to file.
(defun *error* (st) (prompt (strcat “error: ” st “07\n”)))
(setq goes (getstring “Name of ASCII file to create: “) vb (open goes “r”))
(If (/ = vb nil) (progn (close vb) (setq vc (ascii (strcase (getstring
“A file with this name already exists.\nDo you want to replace it? “)))))
(Setq vc 89))
(If (= vc 89) (progn
(setq vb (open goes “w”) vd (ssget) ve (sslength vd) vf 0)
I do not know the password, the author protected it. But it does not stop you from copying cells
To be able to copy and paste a column of data from a spreadsheet to this tells me that the cells are protected, and I do not know what is the key to be able to solve this problem, if you know it I would be very grateful
Hello friends, to be able to use it in office 2007 you just have to convert it to the version, in the icon at the top left is the option, CLICK ALLI. Then you give it to accept. When asked for the option to close and open the book, click YES. It warns you that the unsaved changes will be lost, that does not matter, it is only accepted and now (If this option DOES NOT APPEAR, better). Before using the macro you must observe below the menu bars SECURITY WARNING: Some active content has been disabled, GO TO OPTIONS AND CLICK ON Enable this content and voila…. YOU CAN ALREADY USE IT IN OFFICE 2007.
GOOD LUCK TO EVERYONE!!!!! (DO NOT FORGET THAT THE MACROS OPTION MUST BE ACTIVE AND RECORDING)
If you mean to pass the content, select the text in Excel, copy, and then in AutoCAD, paste
Good as they are all look my question is the following how to pass the fuck excel, to auto cad but in a text?
Very good file. A greeting to the guy who left this file, to see if you throw more contributions.
You do not have to modify it, just enter data.
This application is password protected, it did the author
Hello, I can not modify the options I ask for the unprotected password that I can do in this case
g! or someone, I'm working on drawing a street, almost always do it with a total station but now I have brought traffic data and level (cross sections) does anyone know how to convert this data to UTM? I have a defined axis and the readings of the sections are distances left height in + or -, center line, distances right height in + or - ... if someone helps me Jcpescotosb@hotmail.com
This macro is excellent thanks to all those who make these developments possible.
Hi, I'm looking for a way to create a polygon and adjust it but in arcgis.
First to thank the togographer Juancho for the macro and also to the old man! for locating it and publishing ... what a great contribution !!!!!
The file creates it in c:
Where you create the dxf file
IT DOES NOT WORK ON OFFICE 2007 ALWAYS ERROR ME OUT AND IT SAYS I'LL EXPORT A FOLDER IN CY AND IT DOES NOTHING IS NOTHING LEAVES ME A WINDOW THAT SAYS TO PERU AND I DO NOT SIDE WHAT TO DO
Sorry, I do not know what it will be
Thanks for your quick reply, galvarezhn. Unfortunately it did not work.
the preview error, it seems to me that it could be due to the regional configuration, that the separator of thousands and decimals (semicolons) is changed, check ...
It looks interesting, because it's online; I'll see if I do a review one day of this
thanks for the info
I found a free web application for converting text to dxf
TEXT PASS X, Y, ZA DXF (TOPOGRAPHY)
After setting the trust level for the macro, the spreadsheet still continues to display an error message for the second (PREVISUAL) tab.
Although I continue to export the points to dxf, I would like to fully enable the functionality of this very useful spreadsheet.
To set the trust level
you go to the excel button, the one that is first on the top left, and select the “excel options” button,
then select “trust center”
and there you select "configure trust center"
then choose “macro settings”
and there you choose “enable all macros”
Where I set up the trust level in excel 2007
I congratulate you and tell you that it works very well in ecxel 2007 only that you have to configure the exel in the confidence level and ready
WITH OFFICE 2007 DOES NOT WORK, IF ANY PHENOMENE APPEARS LIKE THE ONE WHO CREATED THE APPLICATION AND UPDATES IT. THANK YOU
To good, then go and change the regional configuration to your machine
Home / control panel / regional settings
Then choose your country in the regional options
there make sure that the thousands separator is established with the symbol "comma" and the decimals with "dot"
Then you enter excel and should work
It works without decimals …… but there the coordinates would not be exact in the plane… .. chaff, what do you advise me ???
Try to enter rounded coordinates, ie no decimals to see if it is not a regional configuration problem (commas are for thousands separations and the decimal point).
I'm presenting an error
I type the north coordinates and these with the quota but does not do the preview
It gives an error
Run-time; '1004 ,:
Unable to get the chartObjects property of the worsheet class
Then I should run you smoothly
Is it missing something?
Hi shaka, what version of excel do you have?
The macro does not work for me, can you help me ???
This is all in progress and now ask for the security of the macro is the minimum such as g! Comments, it does not work !!!!! Help meeee
Hello Marcos, the system generates a message that you can not modify the changes, but if you accept them. That is, you can change the file name and size of the text, and when you execute it, you generate the result.
In case you have more problems, do not change the size of the text or file name, it is not necessary. The size of the text can be edited in autocad.
Hi, I'm trying to use this program to pass a small CAD upgrade per in my excel do not let me change any of the possibilities of the third sheet, this aq may be due? Thanks in advance.
Michael: macro does not work with Excel 2007
Joaquin: macros must be enabled, this is done in tools / macro / security and enable security at a low level.
Your excel sheet is very good but the macros with which the spreadsheet does not work will be disabled that I can do to make them work correctly
It's a very good utility and I've been using it for a long time, but I have a big problem:
It does not work with 2007 office.
I would appreciate any solution to this problem.
I find it very interesting especially for jobs not very large I will try to see that such muffins
Hello Jordi, I honestly have not tried it in excel 2007, to see if someone who has tried it there and confirms if it gives problems
Galvrezhn, first of all, congratulate you on the compilation you have done in this post, and on the other hand (from what I see there is an addict more to the XYZ-DXF, lol) I wanted to tell you if someone, or yourself, In excel 2007, since I had been using 5-6 for years in the previous versions of excel, and I do not know why, but in this it does not make it run (I have macros activated, and all that).