I have an excel sheet with the points x, y and z coordinate in it. I'd like to draw a polyline using those points. Is there available lisp for this?
Thanks.
Solved! Go to Solution.
Solved by Sea-Haven. Go to Solution.
Solved by CodeDing. Go to Solution.
@Anonymous ,
There's probably one somewhere. But we need more information.
1) Is the 'Excel file' an .xlsx format? or csv? A csv is easier to manage...
2) Can you post an example of the file? Will it have headers? gaps? any inconsistencies? These are all considered when trying to locate / organize the data from the file.
3) Will it create a 3D polyline (different Z values)? or a 2D polyline (same Z values)? Will this line be closed? or left open?
4) I see you post in the Inventor Customization forum often. Are you familiar enough with VBA? Do you think you would want to use that to accomplish this task?
Best,
~DD
Its not really a lisp but would do what your looking for.
Good luck!
Hi @CodeDing . Please see my answere in blue.
1) Is the 'Excel file' an .xlsx format? or csv? A csv is easier to manage...
Csv is also ok for me.
2) Can you post an example of the file? Will it have headers? gaps? any inconsistencies? These are all considered when trying to locate / organize the data from the file.
No gaps, no headers.
3) Will it create a 3D polyline (different Z values)? or a 2D polyline (same Z values)? Will this line be closed? or left open?
The Z value will be the different. Open polyline.
4) I see you post in the Inventor Customization forum often. Are you familiar enough with VBA? Do you think you would want to use that to accomplish this task?
I have basic knowledge in vba.
This could be also done with Inventor but it doesnt have to be. This is for different part of work where we only use autocad.
Please see attached csv and dwg.
Thank you.
Please see attached csv and autocad file.
@Anonymous ,
Easy. Just turn your csv into a script.
See this comment here:
Do exactly as they say and your line should draw itself.
- Save x,y,z points as csv (comma delimited)
- open csv in text editor
- Add the text "3DPOLY" as the very first line (do not include quotes)
- Save As the file to a .scr extension instead of csv
- open Acad
- turn your object snaps OFF
- run the script file with the SCRIPT command
Your line will draw itself. Piece of cake.
Best,
~DD
Like the others I would just do from excel direct use the concatenate function.
Re CSV as suggested add the 3dpoly as 1st line then Ctrl+A, Ctrl+C then on Autocad command line Ctrl+V saves having to make a script.
Can't find what you're looking for? Ask the community or share your knowledge.