TheStig Posted January 6, 2006 Share Posted January 6, 2006 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 Quote Link to comment Share on other sites More sharing options...
Adam K Posted January 6, 2006 Share Posted January 6, 2006 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. Quote Link to comment Share on other sites More sharing options...
flagman Posted January 7, 2006 Share Posted January 7, 2006 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(&A1&","&B1 2 200 100 =char(&A2&","&B2 3 200 200 =char(&A3&","&B3 4 100 100 =char(&A4&","&B4 Because Excel puts a " at the beginning of text, the char( 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 Quote Link to comment Share on other sites More sharing options...
TheStig Posted January 7, 2006 Author Share Posted January 7, 2006 Thanks guys Both ways works a treat Cheers Stig Quote Link to comment Share on other sites More sharing options...
TheStig Posted January 8, 2006 Author Share Posted January 8, 2006 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 Quote Link to comment Share on other sites More sharing options...
Adam K Posted January 9, 2006 Share Posted January 9, 2006 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. Quote Link to comment Share on other sites More sharing options...
holte Posted February 20, 2010 Share Posted February 20, 2010 Is there any way of importing the point number aswll as the X and Y ? Quote Link to comment Share on other sites More sharing options...
Thomas Posted July 13, 2010 Share Posted July 13, 2010 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? Quote Link to comment Share on other sites More sharing options...
Thomas Posted July 13, 2010 Share Posted July 13, 2010 (edited) 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. Edited July 19, 2010 by Thomas version update Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.