@kkD7719 wrote:
.... I would like to move the 50.38' text from one spot to another Keeping the same offset from the line. So instead of typing move-nea-nea I would just like to be able to do a pick text, pick line and then be able to slide it parallel to the line.
If the Text [or Mtext] always starts out aligned with the direction of the Line [or Polyline line segment] as in your image, then think about it -- you don't need to pick the Line/Polyline [or any other path element] at all -- you don't even need to have a path associated with the situation. You can just MOVE the [M]Text in the direction of its own Rotation angle. Here's a way to do that, in which the total number of picks is only 2 [one to select the Text/Mtext, the other where you want to take it to]. Lightly tested, and without the usual bells and whistles yet, but see what you think:
(defun C:STRA (/ sna orth tsel tdata txt); = Slide Text along its Rotation Angle
(setq
sna (getvar 'snapang)
orth (getvar 'orthomode)
); setq
(if
(and
(setq tsel (entsel "\nSelect [M]Text to slide along its rotation angle: "))
(wcmatch (cdr (assoc 0 (setq tdata (entget (setq txt (car tsel)))))) "*TEXT")
); and
(progn ; then
(setvar 'snapang (cdr (assoc 50 tdata)))
(setvar 'orthomode 1); ORTHO on
(command "_.move" txt "" (cadr tsel) pause)
(setvar 'snapang sna)
(setvar 'orthomode orth)
); progn
); if
); defun
That assumes it's always in relation to Lines or Polyline line segments [or Xlines, or Rays, or Mlines, or Traces, or edges of 3DFaces or 2D Solids, or nothing at all, or....]. BeekeeCZ's routine would, I expect, also only work as intended in straight-path situations, despite its letting you pick an Arc for a path [why not also a Circle?], which would presumably require a ROTATE command rather than MOVE, if you want its alignment relative to the curve to remain. [It would also let you pick a SPLine as a path, which I assume isn't appropriate, but would not let you pick other viable straight paths such as a Ray.]
Kent Cooper, AIA