k22 Posted November 28, 2013 Share Posted November 28, 2013 Help Please I know how to bring in the x,y cordinates from excel as points into AutoCAD but not the text can someone advise please. I'd prefer not to use a lisp if possible? Thanks Quote Link to comment Share on other sites More sharing options...
ReMark Posted November 28, 2013 Share Posted November 28, 2013 You might take a look at the DATAEXTRACTION command. Quote Link to comment Share on other sites More sharing options...
k22 Posted November 28, 2013 Author Share Posted November 28, 2013 ReMark Could you explain this process? Quote Link to comment Share on other sites More sharing options...
ReMark Posted November 28, 2013 Share Posted November 28, 2013 Extracts drawing data to a data extraction table or external file (ex. - csv). For a full explanation consult your AutoCAD Help file re: DATAEXTRACTION. Quote Link to comment Share on other sites More sharing options...
steven-g Posted November 28, 2013 Share Posted November 28, 2013 Help Please I know how to bring in the x,y cordinates from excel as points into AutoCAD but not the text can someone advise please. I'd prefer not to use a lisp if possible? Thanks What text do you want to import, and how does it relate to the point, can you give an example of the Excel file, and of how it should look in Autocad. What method do you use now to bring in the points Quote Link to comment Share on other sites More sharing options...
Spaj Posted November 28, 2013 Share Posted November 28, 2013 Help Please I know how to bring in the x,y cordinates from excel as points into AutoCAD but not the text can someone advise please. I'd prefer not to use a lisp if possible? Thanks Paste Special to autocad entities will give you an AutoCAD table similar to excel. Quote Link to comment Share on other sites More sharing options...
MSasu Posted November 28, 2013 Share Posted November 28, 2013 bring in the x,y cordinates from excel as points into AutoCAD So you want to create point entities based on coordinates from an Excel file? Apart from an AutoLISP routine, which you seems to don't want, there is the script technology. Just create in your Excel lines like below, save it in ASCII format with SCR extension and call SCRIPT command in AutoCAD. _POINT 0.0,0.0 _POINT 1.0,1.0 ;end of ecript Quote Link to comment Share on other sites More sharing options...
eldon Posted November 28, 2013 Share Posted November 28, 2013 Perhaps I can rephrase the OP's request, so that brains can be directed in the right direction. From an excel file in the form x,y,text, how can I put the text at the x,y coordinate, without using lisp? Quote Link to comment Share on other sites More sharing options...
steven-g Posted November 28, 2013 Share Posted November 28, 2013 Without knowing how it is set out in the excel file and how it should be laid out in Autocad, it's still guess work. It's not difficult to do, but guessing games can get so messy. Quote Link to comment Share on other sites More sharing options...
eldon Posted November 28, 2013 Share Posted November 28, 2013 I would have thought that some text inserted at an x,y coordinate would be a good start (without using lisp) Quote Link to comment Share on other sites More sharing options...
steven-g Posted November 28, 2013 Share Posted November 28, 2013 Simple example using an Excel sheet with X in column A,Y in column B and text in column C, there are formulas in column E so you can change the data in the range A1:C2, Just select and copy the highlighted area, paste it into notepad save the file with the extension .SCR and then drag the script file into Autocad. Getting into Excel macros it is possible to create the script file at the click of a button. For repetitive work it's a great time saver, just takes a bit of setting up so it's not worth it for occasional use. Text2Autocad.xls Quote Link to comment Share on other sites More sharing options...
eldon Posted November 28, 2013 Share Posted November 28, 2013 That's very interesting, but I have never seen a successful formula in one line for dtext. It is all the spaces that don't seem to register properly. As you say. it must be possible, but I have never been able to get it right. The first line plots the text in the right place, and a space should repeat the command, but I haven't got it to work. Is a script file necessary? Can't you just paste to the command line? Here is a little test file to play with. CadTest.csv Quote Link to comment Share on other sites More sharing options...
steven-g Posted November 28, 2013 Share Posted November 28, 2013 Quick reply on one point, pasting directly to the command line works for most commands, but fails for text, because the text input is expected at the text input on screen (works from a script but not direct for some reason). Quote Link to comment Share on other sites More sharing options...
steven-g Posted November 28, 2013 Share Posted November 28, 2013 I never use text or dtext, but found this when I was looking up the difference, apparently dtext will not work in a script or lisp, but text will. So what was the idea with the file you attached - dtext at the given coordinates? http://forums.autodesk.com/t5/AutoCAD-2004-2005-2006-DWG/difference-between-dtext-and-text/td-p/1149519 Quote Link to comment Share on other sites More sharing options...
eldon Posted November 29, 2013 Share Posted November 29, 2013 Thank you for that information, always learning a bit. I always use dtext, because it has a unique function that does not happen with text or mtext. And it suits my work flow. The idea with the data file was to give a few lines of data to play with. I already have a lisp which does everything I want, but I am always on the look out to see if data can be manipulated without lisp. Quote Link to comment Share on other sites More sharing options...
steven-g Posted November 29, 2013 Share Posted November 29, 2013 Here's the version that automaticaly creates the script file, you need to go into the VBA editor and change the file location:name to suit.Before running the script turn off osnaps script.xls Quote Link to comment Share on other sites More sharing options...
eldon Posted November 29, 2013 Share Posted November 29, 2013 Thank you very much for that. I have some homework this weekend. Quote Link to comment Share on other sites More sharing options...
nanzaa Posted April 2, 2015 Share Posted April 2, 2015 sorry i'm beginner how to save .scr ? Quote Link to comment Share on other sites More sharing options...
steven-g Posted April 2, 2015 Share Posted April 2, 2015 A script file is basically just a text file, all you need do is either save your file as a file and use filename.scr when you name it, or save a text file and then change the file extension in windows explorer. If you are using information from an excel file, like in the examples above all you need do is select the cells in excel, then copy and paste into notepad, and save the file. Quote Link to comment Share on other sites More sharing options...
nanzaa Posted April 2, 2015 Share Posted April 2, 2015 Thank you for that information 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.