Kent1Cooper wrote:
.... I think a routine could be made that would ask for a zero-reference level [anywhere at the appropriate Y coordinate], a starting-point in the X direction [possibly in the same pick as the zero-reference level], a profile Polyline or Spline below [or above if you ever do it that way, or even crossing the zero level], and a horizontal spacing between Dimension locations, and would build all those Dimensions for you directly. Is that what you're hoping for, and is that an appropriate set of User inputs?
For example [using the zero-reference-level and starting-X location in one pick option], in rather basic terms, this:
(defun C:DimProfInc ; = Dimension to Profile at Increments
(/ pt profsel inc profobj line lineobj intp base)
(setq
pt (getpoint "\nLeft-end base point at reference elevation 0: ")
profsel (entsel "\nProfile object: ")
inc (getdist "\nHorizontal Increment between vertical Dimensions: ")
profobj (vlax-ename->vla-object (car profsel))
); setq
(command "_.line" (polar pt 0 inc) "@0,-1" "")
(setq lineobj (vlax-ename->vla-object (setq line (entlast))))
(while
(setq intp
(safearray-value
(variant-value (vla-intersectwith lineobj profobj acExtendThisEntity))
); safe...
); setq
(command
"_.dimlinear" (setq base (vlax-curve-getStartPoint line)) intp "@"
"_.move" line "" base (polar base 0 inc)
); command
); while
(entdel line)
); defun
It could use all the usual enhancements [e.g. turn off Osnap before you try it], but first see whether it works as you want.
It does not draw a Dimension at the left-end-in-the-X-direction point, because that's how your sample image is, but could be made to do so.
It uses whatever the current Layer and Dimension Style are, but could be made to set or even create those.
It assumes the drawing is in the WCS, but could be made to work in different UCS's.
The Profile object can be anything with linearity [Line, Arc, Polyline, Spline, etc.], but if it's anything that doubles back so that the temporary Line virtually intersects it in more than one place [Circle, closed Ellipse, Polyline or Spline with doubling-back shape] it will fail because it's expecting only one virtual intersection [but it could be made to account for that, and use, for example, the closer one]. But I assume you don't have that situation in these kinds of drawings.
The Profile object can cross the zero-reference elevation -- it will Dimension down or up as appropriate at each location.
Kent Cooper, AIA