×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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

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

(OP)
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

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

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.

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

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.

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

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.

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

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources