PDA

View Full Version : creating polyline from x,y coordinates



spacepointer
4th May 2007, 12:50 am
Hi,

I have a many x,y coordinates located in excel that i need to turn into polylines. However, i cannot find a function in AutoCAD that will allow me to enter multiple x,y coordinates in order to create a polyline.
Can i import the excel file and make polylines from the data located in the spreadsheet? Or is there a table where i can enter in all of the points to create my polyline? I really can't imagine entering the thousands of data points one at a time.

BTW i am using AutoCAD LT 2006

Thanks!

CarlB
4th May 2007, 01:02 am
You can copy and paste coordinates to AutoCAD's command line, as input to the "pline" command. First get your coordinates into "x,y" format in a single column in Excel. Paste the 1000's in one shot if you want.

spacepointer
4th May 2007, 01:08 am
That creates another problem for me since i have all Xs in one column and all Ys in another. Just getting them into x,y format in a single cell would take hours. Unless there is another way.

Thanks

Nugg
4th May 2007, 02:09 am
In Excel insert a column with commas between X and Y column then use the 'CONCATENATE' function to combine all three columns- then you can copy and paste that column to the command line

CarlB
4th May 2007, 07:53 am
Similar to what Nugg' suggested:

In Column C, the formula, copy down:
=A1&","&B1

hazardman
4th May 2007, 07:54 pm
just thinking...in excel could you not export the file as a comma delimited text file (i know corel quattro pro does)?..open that then do the cut n paste....

rkmcswain
4th May 2007, 08:13 pm
So you have a spreadsheet that contains two columns like this:

5000 5000
5100 5234
5500 6754
5100 7250
4988 9876

...and you want to create a polyline?

1. Save the spreadsheet as a .CSV file.
2. Open this in Notepad.
3. Add a line at the top of the file that says ._PLINE
4. Save this file.
5. Change the file extension to .SCR.
6. Run this as a script file in AutoCAD.

Here is what the SCR file should look like in Notepad when you are finished.

._PLINE
5000,5000
5100,5234
5500,6754
5100,7250
4988,9876