You are here:

AutoCAD/Importing data points form excel into autocad 2009

Advertisement


Question
Hello my name is Mark and I am a mechanical engineering student at Northern Illinois University.  I have the numerical calculations figured and I am now having trouble importing them into AutoCad. I have all my data point in radian values as well as broken my position values into X and Y coordinates.  I believe that these data points can be saved on a notepad(changing the data to a text file)then copied into autcad.  The task that I am trying to achieve is draw a cam in 2D.  The x and y coordinate values are the distance from the center origin of the cam, starting at zero and rotating 360.  I don't know if you can help me but I am stuck.  Thank you very much for you time.

Answer
I would do one of two different things, depending on your data.

1.  If your X and Y coordinates are relative to a center, I would assume the center is 0,0? that would mean that some of your values will be negative half the time. If that's the case, you can treat them as absolute coordinate values and just feed them into a pline command prompt.
So you'd take all your coordinate values and put them into a file with an .SCR extension and at the top put PLINE and at the bottom an extra enter. Then each coordinate on a line by itself as X,Y. Load that file into autocad with the SCRIPT command.

2. If above is wrong then you need to do some more work. You need a distance and an angle from a centerpoint, it sounds like you only had the angle? You can use these with the autolisp POLAR function (see the autolisp reference) and a similar technique.

AutoCAD

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scott Cook

Expertise

I`ve been using AutoCAD since 1987 and programming AutoLISP nearly as long. I can answer questions about programming AutoCAD (except ARX) and production enhancement techniques. I cannot answer questions about AutoCAD crashes or DWG corruption. AutoCAD PROGRAMMING (menus, lisp) related questions only!

Experience

Since 1987. Author of Plot2000 software for for AutoCAD, http://www.plot2000.com. PROGRAMMING QUESTIONS ONLY PLEASE. Questions that are NOT related to programming or AutoCAD customization (menus and lisp only please) are outside the scope of my volunteer services and will NOT BE ANSWERED.

©2012 About.com, a part of The New York Times Company. All rights reserved.