+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Junior Member
    Using
    not specified
    Join Date
    Jun 2005
    Location
    London
    Posts
    16

    Default Coordinates from Excel to AutoCAD

    Registered forum members do not see this ad.

    Is the there any way to get a load of x/y coordinates from an excel spread sheet and import them as polylines?

    Ps AutoCAD 2005

  2. #2
    Forum Newbie
    Using
    not specified
    Join Date
    Dec 2005
    Posts
    3

    Default excel to polylines

    You can convert your excel file to a script file, and then run it in autocad.
    Script files are basically compiled autocad commands in written in Notepad. Simply copy and paste your coordinates to a notepad file (make sure the coords are space delimitted). Preceed your coordinates with the pline command, and then save the notepad file in a logical location. Then go to your autocad file, use the tools menu and select "Run Script...," and select the file you created. Script files are a bit tricky to run if you aren't careful where you place spaces. You also cannot use aliases or transparent commands in script files. It helps to practice on a few short plines, and see the results before you deal with a large group of coords.

  3. #3
    Forum Newbie
    Using
    not specified
    Join Date
    Jan 2006
    Location
    Flagstaff, AZ
    Posts
    1

    Default Coordinates from Excel to AutoCAD

    The easiest way is to create a formula that builds a text string that AutoCAD understands, then start the polyline command, and copy the cells that contain the formula and paste them to the command line (make sure you paste to the command line and not into the drawing window)

    Just "add" (concatenate) the data together with the '&' symbol (or the concatenate formula if you are writing your own formula in visual basic)

    Example: to draw a rectangle

    EXCEL sheet
    ----A--|- B--|---- C-----
    1 100 100 =char(8)&A1&","&B1
    2 200 100 =char(8)&A2&","&B2
    3 200 200 =char(8)&A3&","&B3
    4 100 100 =char(8)&A4&","&B4

    Because Excel puts a " at the beginning of text, the char(8) is the ASCII code for backspace to clear it.

    Type 'pline' at the command line in Acad, then copy C1 thru C4 and paste them.

    Incidentially, you can take this to the next level and build text strings that include the autocad command. For instance, it is pretty easy to build a command in an excel formula that inserts a block at a point, scales it, fills out attributes, then draws a line to the next point, and so on.

    good luck

  4. #4
    Junior Member
    Using
    not specified
    Join Date
    Jun 2005
    Location
    London
    Posts
    16

    Default

    Thanks guys

    Both ways works a treat

    Cheers

    Stig

  5. #5
    Junior Member
    Using
    not specified
    Join Date
    Jun 2005
    Location
    London
    Posts
    16

    Default

    Hi Guys,

    I tried both methods using a simple square and they both worked. Unfortunately when it got a little more complicated the copy and paste method worked but when I tried the run script method it only seemed to plot every other point. I tried adding and removing spaces, returns etc. but with no results.
    Any suggestions?

    Cheers

    Stig

  6. #6
    Forum Newbie
    Using
    not specified
    Join Date
    Dec 2005
    Posts
    3

    Default script file troubles

    The easiest way to check your script file is to run it in Autocad and look at the command line screen to see where it stops working, then you can go back to that point in your script file and make appropriate corrections. The problem with a script file is that there can be a lot of trial-and-error. Another way to help check for any errors is to write the script file in MS Word or some other program that can show spaces and "enter" commands, and then save the file as a ".scr" file. If you showed me a sample of what your script file looks like, especially where it fails you, I might be able to help. Good luck.

  7. #7
    Forum Newbie
    Using
    AutoCAD 2005
    Join Date
    Feb 2010
    Posts
    1

    Default

    Is there any way of importing the point number aswll as the X and Y ?

  8. #8
    Forum Newbie
    Using
    AutoCAD LT 2007
    Join Date
    Jul 2010
    Posts
    2

    Default

    Quote Originally Posted by holte View Post
    Is there any way of importing the point number aswll as the X and Y ?
    Good question. Any answers? I use Autocad2007LT.

    I have an Excel spreadsheet.

    Column A (x) and B (y) have the (9 digits) coordinates. Column C the follow up point number
    116746000 514240000 1
    116748000 514244000 2
    116750000 514251000 3
    116751000 514256000 4
    .....
    xxxxxxxxx yyyyyyyyy 2500
    What is the way to put this into Autocad LT 2007? Or is there no way?
    Last edited by Thomas; 13th Jul 2010 at 02:45 pm. Reason: layout problems

  9. #9
    Forum Newbie
    Using
    AutoCAD LT 2007
    Join Date
    Jul 2010
    Posts
    2

    Default

    Registered forum members do not see this ad.

    Ive found something like "RapidDXF 3.0" which promises to be what I am looking for. But I can not find a suitable download location because of broken links.

    Anyone a bright idea? Thanks in advance.

    edit: Try and find "RapidDXF 3.1".
    If you know the French language, it works easily.
    Last edited by Thomas; 19th Jul 2010 at 03:17 pm. Reason: version update

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts