Jump to content

x,y,Text from excel to AutoCAD


k22

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 22
  • Created
  • Last Reply

Top Posters In This Topic

  • steven-g

    8

  • eldon

    5

  • ReMark

    2

  • k22

    2

Top Posters In This Topic

Extracts drawing data to a data extraction table or external file (ex. - csv). For a full explanation consult your AutoCAD Help file re: DATAEXTRACTION.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?
Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 year later...

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...