Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generating Special Curve in AutoCad

Status
Not open for further replies.

Evening

Technical User
Jan 19, 2005
45
CA
I want to generate a special curve in AutoCad aproximating with little lines whith endpoints, which I've calculated in Excell spreadsheet. (example given cordinates for 150 points X,Y) I can do it drawing lines one by one what will take a long time. I know Autolisp is a way to generate a command, is it possible to do it? I could generate a text string in Excel, with 300 data separating with commas. May I copy the alreday calculated cordinates (separating with commas from each other), and just paste in Autolisp program? Should I start to learn Autolisp programming or I can ask somebody here for help?
Any help I'd appreciate .

Les
 
a quick onetime solution.
in Excel insert a few extra columns around you data as follows
and a new first row

new old new old new
a b c d e
1 "line"
2 " 52 , 54 "
3 " 55 , 54 "
4

SaveAs the excel file as Formatted Text *.prn

Open in word, and do a replace. replace the space with nothing.

open AutoCAD and run this file as a script file. (I think that's what it's called)
essentially autoCAD will read each line of the file into the command prompt automatically for you.

If you don have many to do this may be a quick solution.

Kevin Petursson
 
Evening,

Once you have the points in Excel in x,y format, you can paste these directly into AutoCAD's command line - you don't need to paste it into a lisp or script file. Just start the line command, then copy and paste from Excel. To get the x,y into one column (so you can copy and paste in one operation), use a formula in Excel to string together x and y values with a comma separator. Assuming x in column A and y in column B, formula would be:

=A1&","&B1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top