×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Plotting Lines from an Excel table in AutoCAD

Plotting Lines from an Excel table in AutoCAD

Plotting Lines from an Excel table in AutoCAD

(OP)
Is there an easy way to plot a line from a list of entries in a Excel table?  The problem is that i have a large table in Excel with survey levels and wish to save time inserting them into CAD.  

I have been simply drawing them in as polylines in the past, which is a labourious process, any help would be much appreciated

RE: Plotting Lines from an Excel table in AutoCAD

Yes there's an easy way. Get your point data into the format of:

x1,y1
x2,y2
etc...

by saving an Excel file in csv format, or by using the "concatenate" function in Excel. In AutoCAD start the line or polyline commad.  Then paste in the "x,y" data from the Excel file or from the .csv file, into the AutoCAD command line.  Presto!

RE: Plotting Lines from an Excel table in AutoCAD

(OP)
Thanks v much for the help Carl, most valuable, will save me alot of time... Ta

RE: Plotting Lines from an Excel table in AutoCAD

Hi there,
I've a similar problem to the one above. Is there an easy script to short cut the copy and paste method. I've got about 200 lines to import from an excel spreadsheet.
I've tried using the following.
line
x1,y1
x2,y2
etc
but end up with lines that are not straight but on an angle?? If I type the same co-ord in by hand the line is straight

Also when I have tried doing it the method mentioned above ,a couple of lines at a time, it works but I end up getting a line joining the end of the last line to the start of the next.

RE: Plotting Lines from an Excel table in AutoCAD

It sounds like you may have some extraneous spaces after the x,y data, which acts as a "return" in AutoCAD.

To get x,y data in one column for copying/pasting, the formula in column A would be something like:

=B1&","&C1

RE: Plotting Lines from an Excel table in AutoCAD

Wow I just posted it and a star appears next to the post.  Honest, I didn't give it to myself!

RE: Plotting Lines from an Excel table in AutoCAD

Thanks CarlB,
             Managed to get the lines imported using the script method. Still a little problem being that the lines once imported should be seperate line but are joined ie end of one to start of the other. is there a command I can put into the .scr file to divide these line? With 250 lines I don't exactly want to have to add each one individually.

Cheers
mpw

RE: Plotting Lines from an Excel table in AutoCAD

The problem is there needs to be a separate "line" command for each segment.  The way you have it the line command is running continuous using each endpoint. You need a space or a return after each pair of points, then another space in front of the next pair to repeat the line command. Either of the following should work:

Line
x1,y1
x2,y2
[blank Line -ends line command]
[blank line - restarts the line command]
x3,y4
x5,y5
etc.......

-OR-

Line
x1,y1 x2,y2
[2 blank lines, or line with 1 space, or no line but 2 spaces at end of preceding line]
x3,y3 x4,y4
etc...

RE: Plotting Lines from an Excel table in AutoCAD

Thanks once again Carl.
Cheers

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources