Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Pleeesss How can I draw lines with point definitions from a database

Status
Not open for further replies.

Akhibi

Mechanical
Sep 19, 2003
48
I have a database (up to a thousand records) of points described with x,y and z fields. I am burdened with the enormous task of drawing a 3D line with these points.

Has anybody seen a code in VBA that can import database attributes and use them in the "line command"?

This will be a lot easier than entering the points manually.



Greg Akhibi
ABB Lumus Global
 
Replies continue below

Recommended for you

One method is to create a script file from the data. You need to manipulate the file so it has the points in comma delimited format, ie x,y,z one on each line. Then add the word LINE with a space after the E to the first record. Then save the file as a txt file or pure ASCII text file with a .scr extension. In autocad, type SCRIPT and then the name of the file.
 
From another post by another person:

Create a column that combines the x & y into a format of "x,y". This can be done with the concatenate command or a line similar to =A1&","&B1.  Copy-clip the column. Inside of Acad start the Pline command, pull up the text window (F2), under Edit hit Paste. The profile will draw itself.
 
Hi Akhibi,
I have a lisp program import from text file data but only use for 2D ( x,y ) do not have z elevation.
It work well but some time have error. If you want to modified to 3D(x,y,z), I will send here.
 
Thanks for all the contributions, you certainly have solved my problem. Have been away to the fields for a while now.
CAD123 I would not mind having a look at the lisp program you talked about.

Akhibi

Greg Akhibi
ABB Lumus Global
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor