In this article, I have explained two different ways of importing the X, Y, Z Coordinates (Easting, Northing & Reduced Levels) from an Excel sheet to AutoCAD in the form of points.
In the first method, we will use only excel to compile data and then we will simply import the data in AutoCAD. In the second method we will transfer the date from excel to a simple script file and then we will import the script file in AutoCAD to make the points.
These methods are explained in the tutorial video as well shown below, but if you prefer the article then here it is.
Importing coordinates using excel formula
As shown in this pic below, we have X, Y, Z coordinates, otherwise Easting, Northing & Reduced levels of more than 10000 points in an Excel sheet.
To create points using this data (to Export this data into an AutoCAD drawing), we have to convert this data into the language that AutoCAD can understand. We can convert this data in coordinate points and AutoCAD uses POINT Command to make points in AutoCAD.
Type in POINT in the command bar and hit the Enter key.
Now we have a message at the Command Prompt, ‘Specify a Point’, There are two methods to specify a point.
- Feed the X, Y, Z Coordinates of the Point in the Command Bar.
- Click anywhere in the drawing area and an AutoCAD point Object will be created at that particular point.
Here I will go with the first method i.e feeding the X, Y, Z Coordinates of the Point in the command bar, let it be 1000,1000,1000.
Press the Enter key and an AutoCAD point is created at 1000,1000 with an elevation of 1000, see the animated gif above for reference. If you want to verify the coordinates of the point you can do that using the Property Palette.
Select the Point, Right Click, select Properties from the menu. Values which we used to create this point are shown against the labels Position X, Position Y, Position Z as shown in the image below.
The sequence of commands used to create the point can be replicated approximately 10,000 times to create all the points but obviously, it can’t be done manually and this is where the Excel formula comes into the picture. The flow of command for POINT looks like this on the command bar history.
Here is the flow of the command shown in the image above.
Command: POINT
Current point modes: PDMODE=0 PDSIZE=0.0000
Specify a point: 1000,1000,1000
In our Excel sheet, X,Y,Z Coordinates of Point 1 are in the cells B2, C2 and D2 respectively.
From the command history, it is clear that the syntax for creating a point in AutoCAD is POINT X,Y,Z. So for 10,000 points, this value should be repeated for as many times. The resulting data should look like data inside the red box of the image below.
For creating a point using the coordinates given in the cells B2, C2 and D2, we have to join the data in the cells B2, C2 & D2 preceded by POINT command and we can use CONCATENATE function in Excel to join the strings.
In the image above the CONCATENATE function is used to join the strings, for your reference I am writing the complete formula here as well.
=CONCATENATE(“POINT “,B3,”,”,C3,”,”,D3) is the formula to join the 5 strings listed below.
- POINT (AutoCAD Command)
- “ “(Space Character)
- B2 (the cell containing the X Coordinate)
- C2 (the cell containing the Y Coordinate)
- D2 (the cell containing the Z Coordinate)
And the result is POINT X,Y,Z, The formula can be copied into the downward cells using the fill handle feature in Excel.
Copy this data, Open an AutoCAD drawing and Paste it into the command bar as shown in the animated gif below.
And by doing that and we just created around 10000 points. To cross check the total number of points created, Select all (Ctrl+A is the shortcut for selecting all objects in an AutoCAD drawing), Right click for the Properties palette and there you can see the total number of points in the drawing.
We can also use Command Aliases in the formula, command Alias for Point Command is PO. The formula will then become, =CONCATENATE(“PO “,B3,”,”,C3,”,”,D3)
Using Script file to import coordinates
There is also another method which works in a similar way and it makes use of the script file of AutoCAD.
Again, let’s assume we have our coordinate data in an excel sheet in three columns namely X, Y and Z (or Northing, easting and elevation if you prefer). Now copy data from all of these cells then open Notepad or any other simple text editor and paste the complete data in it, this process is shown in the video below.
You data will look like the image shown below, with lots of spaces between the values of respective cells. We need to replace the spaces here with the comma. Select the space between respective cell entries and go to the edit menu of Notepad and select the Replace option.
Now in the replace with field, type “,” (without quotes) and press replace all button and close the replace window, take reference of animated gif shown below.
Now type _MULTIPLE_POINT in the first line of the notepad text just before the coordinate values and then go to file menu then save as option and save the file with .scr format. You can give it any name you want, in this example, I am using point.scr as the notepad file name.
Now we can import these points pretty easily in AutoCAD using SCRIPT command. Type SCRIPT then press Enter key in your AutoCAD command bar and then locate the scr file you created in the example above and click on Open button.
The points will be added in the drawing, the point command will also remain active which you can deactivate by pressing the ESC key.
That was all, I hope you have found this article useful. If you have questions related to the article feel free to let me know in the comments below.
References: Autodesk knowledge network article
This is great! Is there an easy way to convert the imported points into blocks? in AutoCAD LT or AutoCAD?
This was an age long problem, but this article had really help me to know there are different methods of achieving it. Thanks my man for sharing the article.
Thanks very much for sharing. I want more to learn from you.
thank you very nice idea
Thank you very much for sharing, simple and clear instructions, worked well for me. Much appreciation.
thanks very helpful refreshing
Thank you so much. This is very important for all Civil Engineers and Survey Engineers. Thanks a lot for your nice sharing.
Your continued assistance to those of us that try and learn more about Autocad is refreshing, and this particular article was very helpful to me in the immediate sense. I own Lewis and Lewis software that will do the same thing, but recently there must have been a bug, because this function of the program was inoperative. I called the owner, and found he was recently diagnosed with Alzheimers, and no longer knew what a computer even was. I thought I was simply out of luck until this article came along…a true life saver.
Hello and thank you for the valuable help. I came by your post trying to transfer coordinates as well. There is another way, without the “point ” and this happens if you open the point command in autocad and then copy / paste the coords (x,y,z). The result is the same. The problem I’ m having though, is how to add text description to the point so one can see the numbering of the point as well. Food for thought… Have a nice day and keep up the good work 🙂
Thank for your sharing. This is great useful. When i copy excel data and paste in AutoCAD, showing unknown command. is it working for higher version? Now i m using 2010. Thanks.
Thanx for uploading such a important information, really appreciate your support sir….
Can we create automatic lines by using those points. If yes, then how?
Please share it
point command in not working. i want plot ” POINT 473460.539 , 653721.425 ” coordinates. but auto cad ask from me “Specify a point: 473460.539
Command: , Unknown command “,”. Press F1 for help.
Command: 653721.425
Unknown command “425”. Press F1 for help. “
thank you very much. I’ve learnt a lot from this tutorial.
how to add text in each point
Hello,
What about a script for multiple individual lines that I don’t want joining together. For instance:
Line 1 x1, y1 to x2, y2 then Line 2 x3, y3 to x4, y4 and so on
All the scripts i have constructed so far will also end up joining x2, y2 to x3, y3
thank you
Very good for freshers.thanks both guys
Simple with more clarity .more helpful.
I wonder, however, if there is a way to have autocad print next to each point, the point number?
Thank you so much. This is very important for all Civil Engineers and Survey Engineers. Thanks a lot for your nice sharing.
Welcome Billal, I am glad you found it helpful.
Thankyou Mr Jaiprakash for your share about autocad. act im not civil student before im tourism management . . but i want learn more for myknowledge and can create experience in my new career.
Nice thanks
Thank you Pandey.
Your continued assistance to those of us that try and learn more about Autocad is refreshing, and this particular article was very helpful to me in the immediate sense. I own Lewis and Lewis software that will do the same thing, but recently there must have been a bug, because this function of the program was inoperative. I called the owner, and found he was recently diagnosed with Alzheimers, and no longer knew what a computer even was. I thought I was simply out of luck until this article came along…a true life saver.
Thank you for your continued (and invaluable) information.
Welcome Mark, I am glad this article helped you.
Thank you for sharing.