Please create a LISP routine that will trim dimension extension lines

Please create a LISP routine that will trim dimension extension lines

Anonymous
Not applicable
1,302 Views
7 Replies
Message 1 of 8

Please create a LISP routine that will trim dimension extension lines

Anonymous
Not applicable

Can someone please create a LISP routine that will trim dimension extension lines.

 

See below... 

 

Dim Trim.jpg

0 Likes
1,303 Views
7 Replies
Replies (7)
Message 2 of 8

Kent1Cooper
Consultant
Consultant

Wipeout?  Put it behind everything else, and then put the Dimensions behind the Wipeout.

 

The only alternative is probably to drag the definition points over to the right-edge wall line, but I wouldn't recommend separating those from their associated plan elements.

 

EDIT:  Actually, another alternative is to assign large values of the DIMEXO variable to each Dimension, but that would be a pain, since there would be numerous different values you'd have to figure out.

Kent Cooper, AIA
0 Likes
Message 3 of 8

sergiojavorouski
Explorer
Explorer

Please, try this

(defun c:td (/ CNT ENTG ENTN P1 P2 P3 P4 SS1)
(setvar "cmdecho" 0)
(setq *error* nil)
(if (setq ss1 (ssget (list (cons 0 "DIMENSION"))))
   (if (setq p1 (getpoint "\nSelect first point: "))
      (if (setq p2 (getpoint p1 "\nSelect second point: "))
         (progn (setq cnt (sslength ss1))
            (repeat cnt
               (setq entn (ssname ss1 (setq cnt (1- cnt))))
               (setq entg (entget entn))
               (setq p3 (inters p1 p2 (cdr (assoc 10 entg)) (cdr (assoc 14 entg)) nil))
               (setq p4 (inters p1 p2 (cdr (assoc 13 entg)) (polar (cdr (assoc 13 entg)) 

                                 (angle (cdr (assoc 10 entg)) (cdr (assoc 14 entg))) 1) nil ))
               (setq entg (subst (cons 13 p3) (assoc 13 entg) entg))
               (entmod entg)
               (setq entg (subst (cons 14 p4) (assoc 14 entg) entg))
               (entmod entg)
            )
         )
      )
   )
)
(princ)
)

Message 4 of 8

Michiel.Valcke
Advisor
Advisor

dimbreak?

0 Likes
Message 5 of 8

sergiojavorouski
Explorer
Explorer

 

Move the reference points of the dimensions to the reference line.

 

sergiojavorouski_0-1658951207855.png

 

0 Likes
Message 6 of 8

ВeekeeCZ
Consultant
Consultant

Try THIS free app. 

Message 7 of 8

Kent1Cooper
Consultant
Consultant

This was probably not an option at the time of Message 1, but in more recent versions you can get that directly in a Dimension Style setting.  Before:

Kent1Cooper_0-1658965384805.png

Change the setting:

Kent1Cooper_1-1658965461991.png

and the result, without wipeouts or changing the definition points of any of the Dimensions [so they retain their Associativity if done that way, and they update with Stretching of the dimensioned things even if not Associative]:

Kent1Cooper_2-1658965547164.png

Kent Cooper, AIA
Message 8 of 8

sergiojavorouski
Explorer
Explorer

I hadn't seen this option.

It's really better.
Thanks.

0 Likes