@ronjonp wrote:
Here's a quick one with not much error checking:
(defun c:foo (/ el p1 p2 s)
;; RJP » 2024-01-31
(if (setq s (ssget ":L" '((0 . "LWPOLYLINE"))))
(foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
(setq el (entget e))
(setq p1 (vlax-curve-getpointatdist e 1.))
(setq p2 (vlax-curve-getpointatdist
e
(1- (vlax-curve-getdistatparam e (vlax-curve-getendparam e)))
)
)
(setq el (subst (cons 10 p1) (assoc 10 el) el))
(setq el (subst (cons 10 p2) (assoc 10 (reverse el)) el))
(entmod el)
)
)
(princ)
)
Thanks all for the quick responses! It's very much appreciated and a bit to chew on.
ronjonp, I went with yours since it's the easiest for me to understand at the moment. I need to change the 1.0 shortened length to 1.75. I figured out the p1 variable, which works, but not sure about the other end?
(defun Nudge_1 (/ el p1 p2 s)
;; RJP » 2024-01-31
;(if (setq s (ssget ":L" '((0 . "LWPOLYLINE"))))
(if (setq s ss_center2)
(foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
(setq el (entget e))
(setq p1 (vlax-curve-getpointatdist e 1.75))
(setq p2 (vlax-curve-getpointatdist
e
(1- (vlax-curve-getdistatparam e (vlax-curve-getendparam e)))
)
)
(setq el (subst (cons 10 p1) (assoc 10 el) el))
(setq el (subst (cons 10 p2) (assoc 10 (reverse el)) el))
(entmod el)
)
)
(princ)
)
AutoCad 2018 (full)
Win 11 Pro