Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Active Contributor
brian_shick
Posts: 27
Registered: ‎07-21-2008
Message 1 of 3 (85 Views)

Draw Lines from a Table

85 Views, 2 Replies
03-27-2009 03:02 PM
Is there a way to create a LISP that will create a series of "Tick Mark" lines from an Excel table with XYZ data? This is the Idea: we have a table submitted from a survey company and would like to make a to make a LISP, or something, that can create a small line indicating the beginning and ending of certain material on the centerline of a proposed routing. The table will have XYZ coordinated of each material type from beginning to end.

Is this possible?

Thanks,
Brian
Distinguished Contributor
curmudgeon
Posts: 156
Registered: ‎05-22-2007
Message 2 of 3 (85 Views)

Re: Draw Lines from a Table

03-28-2009 08:46 AM in reply to: brian_shick
I hesitate with "Excel table". I have mostly avoided Excel, and work in open office.
But, if you can get your file to export in csv format, I can show you how to read that into Autocad.

A simple spread sheet I have done. Tables mean other things to me in other languages, and I become uncertain.
Export to csv, and you will have a pure text file, delineated with commas, and lisp can read it line by line,
parse for commas, and draw whatever lines, or insert block, or whatever, depending on what the geometry
in the spread sheet means.


regards,

roy
Active Contributor
brian_shick
Posts: 27
Registered: ‎07-21-2008
Message 3 of 3 (85 Views)

Re: Draw Lines from a Table

03-30-2009 07:31 AM in reply to: brian_shick
Yes, that is possible. I can export a CSV file having the XYZ coordinates of where I need a line placed. Is there a simple go-by somewhere I could follow that you know of on how to do this? The problem I have is understanding how to get the information into ACAD. If I had a go-by I could reverse engineer it to work for our situation.

Attached is an example of the type of data we will get from the survey company. The bX, bY, bZ is the beginning of a material type and the endX, endY, endZ is the end of that material type figured on the beginning of the next material type. The idea is to somehow have a LISP Import the material beginning coordinates from an excel or CSV file and draw a little line on our pipe centerline to indicate each change of material. Sounds easy, but having never done anything like this it has me at a road block.

Thanks for your help.
Brian
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.