help with autolisp

help with autolisp

Anonymous
Not applicable
731 Views
1 Reply
Message 1 of 2

help with autolisp

Anonymous
Not applicable

Hello guys,

 

I am after some code that will drawing a polyline with an "n" number of vertices (from user input) and each segment of the pline stating the distance as a mtext at the midpoint between the each of the vertices rotated so that it is parallel with the pline itself.

 

Thanks in advance.

0 Likes
732 Views
1 Reply
Reply (1)
Message 2 of 2

Kent1Cooper
Consultant
Consultant

You may be able to use DimPoly.lsp, available here.  Read more of that thread about it, and the comments in the file.  It has commands for doing it either inside [DPI] or outside [DPO] the Polyline.

 

It draws Dimensions, rather than Mtext, but if you make a Dimension Style with both extension lines and both dimension lines suppressed, it will look the same -- all you will see will be the text part.  And if you Stretch the Polyline, the length indicators on at least all line-segment edges of it will adjust by themselves in content and position and rotation, which Mtext labels would not do.

Kent Cooper, AIA
0 Likes