Place dimentions extention lines on same Y-value

Place dimentions extention lines on same Y-value

Pascal_Ostyn
Explorer Explorer
354 Views
2 Replies
Message 1 of 3

Place dimentions extention lines on same Y-value

Pascal_Ostyn
Explorer
Explorer

I am trying to write a Lisp where i can place the origins of the extention lines of the selected linear dimentions on the same Y-value; without moving the dimention line nor it's text. (see pictures below)

1. The user selects the (linear) dimentions

2. The user selects the line where the origins of the extentions should come. (no matter the X-value).

 

I hope I can get some tips/advice.

Thank you.

 

2022-03-22_161216.jpg2022-03-22_161325 B.jpg

 

 

 

 

 

0 Likes
Accepted solutions (1)
355 Views
2 Replies
Replies (2)
Message 2 of 3

ВeekeeCZ
Consultant
Consultant
Accepted solution

Possibly something like this...

 

(defun c:Dimy ( / s y i e)

  (if (and (setq s (ssget "_:L" '((0 . "DIMENSION"))))
	   (setq y (cadr (getpoint "\nPick new Y coord: "))))
    (repeat (setq i (sslength s))
      (setq e (ssname s (setq i (1- i))))
      (setpropertyvalue e "XLine1Point/Y" y)
      (setpropertyvalue e "XLine2Point/Y" y)))
  (princ)
  )

 

But if they are associative to the objects, you'll lose it.

Message 3 of 3

Pascal_Ostyn
Explorer
Explorer
This works perfect!
Thank you so much.
0 Likes