I posted this topic before about 8 years ago and did not get a good answer.
I want to dimension along a curvy polyline. I don't want to station it like a centerline. It is for pavement marking dimensions in a curvy road and I want to show the total length of turn lane lines while they go through an s-surve. I could draw the dimensions manually and have in the past, but I was wondering if anyone has come up with a better way. For the contractor, I would simply station and offset it, but it makes it easier for the reviewer to see total turn lane, taper and lane shift lengths, rather than having to calculate them from station and offset callouts.
Solved! Go to Solution.
Solved by AllenJessup. Go to Solution.
The mtext field works to give the length, but I was hoping for a dimension with leader lines, arrow heads, etc. to show what the text means. Otherwise it is just a number floating in space.
Expanding on Jeff's idea. You could create a Dimension then edit the Dimmtext and replace it with a field that contains the polylines length. That way you could utilize and lines or arrows drawn with the dimension.
Allen
Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
BTW. Since fields are linked to the object it will update if you edit the line or polyline.
Allen
Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
put the field in the dimension text
Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
This is getting close to what I wanted. Is there a way to put the field in the aligned dimension, or do I just need to override the dimension text with a blank and then move the mtext field to the gap in the dimension line? I tried help, but came up with nothing.
Just create the dimension, start the ED (DDEDIT) command, select the dimension text, rt-click on the highlighted text and select Insert Field. Then you can link the field to the object.
Allen
Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Thanks to everyone.
It was not quite what I wanted, but it works. I had hoped for the dimension line to follow the s-curve to show that the dimension actually accounts for the arc lengths and tangents on a different angle from the dimension. For shorter s-curves with larger radii it does not make much of a difference, less than a percent, so close enough for now.
You can add text to the dimension to make it clear. I don't know of any way to add a curved dimension line.
Allen
Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
The only CAD platform that I know which had curvilinear dimensions was CATIA. I've had cases where I've wished for this capability, but not enough to warrant attempting a custom solution.
However, if this method of using an aligned dimension with a field for the length works well enough, attached is a lisp to help automate the task. Just load the lisp, invoke the command "DIMPOLY", select the polyline, pick a point to place the dimension, the field gets added automatically. You could add to the text automatically placed to show that it is an overall length by editing this portion of the code:
(strcat "%<\\AcObjProp Object(%<\\_ObjId " (Get-ObjectID-x86-x64 obj) ">%).Length \\f \"%lu6\">%" ) to this: (strcat "%<\\AcObjProp Object(%<\\_ObjId " (Get-ObjectID-x86-x64 obj) ">%).Length \\f \"%lu6\">%" "My custom text" ) or whatever you desire that custom text to be.
Jeff,
I wanted to try out your lisp but got this error:
Command: DIMPOLY
Select object to dimension: ; error: no function definition:
VLAX-ENAME->VLA-OBJECT
I was trying to dimension a LWPolyline containing 3 arcs.
Allen
Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Thanks Jeff. Works fine now.
Allen
Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Jeff,
I got the original lisp to work, but the dimension lines are not associated to the polyline, so if I edit the polyline, I must move the dimension grips. At first the field appears not to update, but a regen takes care of that.
I would like to change the precission. I tried several things, but could not get my changes to work. For pavement markings the nearest foot is fine, but there are other times I might need it to the nearest hundredth.
I also am having problems with the suggested change to add my note to the end of the dimension field.
I don't know LISP well enough to figure out what is wrong. Can you suggest corrections to get the dimension lines associated with the polyline, change the precission to either zero or two decimal places, and the add the comment as a suffix to the number.
While you wait for Jeff to respond I'll add what little I know. If you have "Make new dimensions associative" checked on the User Preferences tab in Options, the new dimension should be associative. Works for me anyway.
This is how I edited the lisp to add my own text
(setq txt (strcat "%<\\AcObjProp Object(%<\\_ObjId "
(Get-ObjectID-x86-x64 obj)
">%).Length \\f \"%lu6\">%"
" O.A."
Put a space in front of the text to separate it from the field.
The only way I know to change the precision is to edit the field. If you right click on it and select Edit Field, you can then change the format to Decimal and change the Precision in the drop down box below that pane.
Allen
Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Allen covered the other questions, for the precision: in it's current form it is using the drawing's current units setting for the precision. You can hard code this like so:
Edit this: \"%lu6\" to this for decimal units with 0 precision: \"%lu2%pr0\"
What text would you like to have added to it and where (start, end)?
I should add that this lisp was a quick n dirty "let's see if this will work" kind of lisp. There is no error checking (try selecting a closed pline, might get undesirable results)and it would actually be fairly simple to add prompts for the precision and prefix/suffix text strings.
@Jeff_M wrote:I should add that this lisp was a quick n dirty "let's see if this will work" kind of lisp. There is no error checking (try selecting a closed pline, might get undesirable results)and it would actually be fairly simple to add prompts for the precision and prefix/suffix text strings.
Of course I had to try right of way. If you close a Pline that is already dimensioned the field shows the perimeter. The dim line stays in the same place. If you try it on an already closed one you get a 0 length dimension at the point of closure and the field shows the perimeter.
Easy for some. I haven't written any meaningful lisp in about 10 years.
Allen
Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
I didn't say easy, I said simple. 🙂 Attached is a revised version that will ask for the precision (it will use the drawing default if nothing entered and suffix (I've allowed spaces to be used, so to respond without any suffix the Enter key must be used).
I made sure to include the vl-load-com this time, too.