AutoCAD/cumulative length of lines and arcs
Expert: Bill DeShawn - 9/24/2007
QuestionQUESTION: Hi,
I have a number of 3D points, and they are connected with lines and arcs. I need a solution for calculating HORIZONTAL lengths and cumulative HORIZONTAL length by selecting lines and arcs. Can you help me?
ANSWER: I will interpret "horizontal" to mean flattened 3D lines. First copy the lines off to the side. Then, you can run Z0.LSP from my website on the new lines and arcs. Go to my web site and then to the AutoLISP site and download Z0.lsp and run it. If the ARCS are not parallel to the world UCS you will need to run FLATTEN (EXPRESS TOOLS) on them. Then download and run
http://my.sterling.net/~bdeshawn/tlen.lsp
Let me know how it goes.
Keep in touch
Bill DeShawn
http://my.sterling.net/~bdeshawn
---------- FOLLOW-UP ----------
QUESTION: Ok, this is one way to solve the problem. I can finish my job with this.
But, if I tell you what I really want to do, maybe I will get more specified answer.
That 3D points are very important, because by clicking on it, my autolisp routine draw text about their elevations somewhere.
When I click on first point, routine somewhere draw text about point elevation and current total length. Then I click next point, and new elevation and new total length is shown. I have got routine which works with lines (calculate lengths using X and Y coordinates). But what when I come to arc which is defined with 3 points - I have to click on start, middle and end point, and get their elevations and total length.
Can I send you an example drawing somehow?
Thanks
ANSWER: Bane:
Very well. Please send your drawing AND your routine to me at bdeshawn@sterling.net. I will see if I can modify the routine to work with arcs. I am assuming you want the arcs flattened before measuring their length, correct?
Bill DeShawn
http://my.sterling.net/~bdeshawn
---------- FOLLOW-UP ----------
QUESTION: Bill,
I have sent to you what you wanted.
Yes, for calculations everything should be flattened, but I need to have original drawing for next step of post processing.
AnswerOK. Bane, I've sent you your DWG and I've included a LISP routine. The lisp routine you provided doesn't have the base for finding the lengths of arcs. I sent you a routine that does that. I've explained to you in the message that I am unfamiliar with your drafting practice. However, I think I can still help you with the routine. Let me know how it goes and I can continue to improve it.
Bill DeShawn
http://my.sterling.net/~bdeshawn