Hello Fatty,
I just came across this routine and I was wondering if you can make some modifications for me. I have very very limited understanding of AutoLisp and really no understanding of any other programming language.
I would like to use this routine to dimension a closed polyline and place the dimensions inside the polyline. I use the height of the text as the distance to place the dimension. (i.e. if the text height is 1.5 then the dimension is placed 1.5 inside the polyline segment)
Also, is there a way to make the dimensions not associative. I can always just explode them so this isn't a big deal.
Any help you can give me is greatly appreciated.
Hi Kent,
I just tried the MDIM routine and it didn't work correctly. I did a bit of digging and found one called DPL but it didn't quite do what I want it to. This DMP routine seems the closest I have found I just need to figure out how to tweak it a little. Thanks so much for the heads-up. I will keep digging and see what else I can find.
Hi Kent,
I managed to get the DMP routine that Fatty wrote to do what I wanted it to do. There was a comment "change extline length" which made it simple, I just didn't see it right away.
What I want to know is, is there a way to make the extline length equal to negative the current text height? For example, if the current text height is 1.5, the extline length would be -1.5.
I am able to modify the routine based on what I need that value to be, but it would be nice if I didn't have to change it every time.
Thanks for any help you can give me.
@Anonymous wrote:
... is there a way to make the extline length equal to negative the current text height? For example, if the current text height is 1.5, the extline length would be -1.5.
....
Rather than using a negative distance, I would suggest subtracting 90 degrees from the local angle, rather than adding it. Try changing this:
(polar x (+ dop (angle y z) (/ pi 2)) 8.);change extline length
to this:
(polar x (- dop (angle y z) (/ pi 2)) (* (getvar 'dimscale) (getvar 'dimtxt)))
That assumes the text style assigned to the current Dimension Style is not of fixed height. If it is, that will determine the height, rather than the combination of the dimension style's text height and the dimension-scale variable.
I tried DMP [with that new distance determination, and m_ibis's correction for arc segments], and found it inconsistent about both inside-out-side-ness and, at least along some non-orthogonal line segments, distance from segment to dimension. I'm playing around with a different approach, which I'll post if it works out.
@Kent1Cooper wrote:
....I tried DMP [with that new distance determination, and m_ibis's correction for arc segments], and found it inconsistent about both inside-out-side-ness and, at least along some non-orthogonal line segments, distance from segment to dimension. I'm playing around with a different approach, which I'll post if it works out.
I also found that if the closing segment of a closed Polyline is an arc segment, DMP gives the wrong length for it [because of the way it gets the length, the result is that of the entire Polyline minus that last segment, rather than the that of the closing segment].
Attached is my approach, DimPolyInside.lsp with its DPI command, which overcomes the problems mentioned, and has some other tweaks. Be sure to put in the right Layer name, and consider some of the other suggestions in comments.