TheSwamp

CAD Forums => CAD General => Topic started by: Dave M on January 08, 2019, 03:36:15 PM

Title: Change Multileader Defined Height
Post by: Dave M on January 08, 2019, 03:36:15 PM
I'm revising a dwg that I didn't create.  There are alot of mleaders, and the box for the mtext seems to be the same for all of them.  Many are one line of text, or hard wrapped multi-line, but the box is much larger than needed.  This creates a problem when masking because the mask it too large.  I have tried double-clicking the ruler to shrink the box, but it reverts back to the original height when I exit the command.


I don't see a "defined height" setting in the properties window like with mtext.


If anyone has a good solution to fix this, I would love to know what it is.
Title: Re: Change Multileader Defined Height
Post by: ronjonp on January 08, 2019, 04:20:58 PM
Have you tried selecting them all and changing the text width to 0?
Title: Re: Change Multileader Defined Height
Post by: Dave M on January 08, 2019, 05:59:45 PM
Have you tried selecting them all and changing the text width to 0?


Yes, and the width will hold, but not the height of the box.  Probably should have said I'm using 2018 in my OP
Title: Re: Change Multileader Defined Height
Post by: Bryco on January 14, 2019, 08:10:57 PM
Does quick select mleaders then change the landing gap in the properties window help?
Title: Re: Change Multileader Defined Height
Post by: Dave M on January 16, 2019, 11:52:08 AM
Does quick select mleaders then change the landing gap in the properties window help?


I can quick select the multileaders and adjust their landing gap distance, but that doesn't do anything for the height of the text box portion.  If you select an mtext object and look at the properties, one of them will be defined height.  But if you select an mleader object and look at its properties defined height is not an option.


The only thing that seems to be working is to select a lower grip and snap it to a top grip. Sigh
Title: Re: Change Multileader Defined Height
Post by: cadtag on January 16, 2019, 03:49:19 PM
Thats' been irritating me for a while now.  I'm glad you found a fix, even if it is one at a time.  thanks!
Title: Re: Change Multileader Defined Height
Post by: ronjonp on January 16, 2019, 04:54:44 PM
After digging into this a bit more this seems to work ( AutoCAD 2019 ). I would test it out though. I've 'entmodded' mleaders in the past and get some funky results.
Code - Auto/Visual Lisp: [Select]
  1. (defun c:foo (/ s)
  2.   ;; RJP » 2019-01-16
  3.   ;; Reset mleader textbox height
  4.   (if (setq s (ssget ":L" '((0 . "multileader"))))
  5.     (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
  6.       (entmod (subst '(44 . 0.0) (assoc 44 (entget e)) (entget e)))
  7.     )
  8.   )
  9.   (princ)
  10. )
Title: Re: Change Multileader Defined Height
Post by: Dave M on January 17, 2019, 02:44:17 PM
After digging into this a bit more this seems to work ( AutoCAD 2019 ). I would test it out though. I've 'entmodded' mleaders in the past and get some funky results.
Code - Auto/Visual Lisp: [Select]
  1. (defun c:foo (/ s)
  2.   ;; RJP » 2019-01-16
  3.   ;; Reset mleader textbox height
  4.   (if (setq s (ssget ":L" '((0 . "multileader"))))
  5.     (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
  6.       (entmod (subst '(44 . 0.0) (assoc 44 (entget e)) (entget e)))
  7.     )
  8.   )
  9.   (princ)
  10. )


Thanks ronjop!


So far it seems to working well.  The only thing I can think that would make it better is if it could shrink to the extents of the text.  I don't code so I appreciate any help I can get.  I suspect the files I'm working on were converted from Microstation or another platform.


Thanks, again!
Title: Re: Change Multileader Defined Height
Post by: ronjonp on January 17, 2019, 04:13:26 PM
Maybe post a sample drawing. The grips wrap to text on my drawing.
Title: Re: Change Multileader Defined Height
Post by: kdub_nz on January 17, 2019, 05:13:14 PM

Ron,
when the dust settles ... is there a story behind that leader text quote ??

Regards,
Title: Re: Change Multileader Defined Height
Post by: ronjonp on January 18, 2019, 09:01:07 AM

Ron,
when the dust settles ... is there a story behind that leader text quote ??

Regards,
No story .. sometimes the hamster falls off the wheel and unexpected results occur :).
Title: Re: Change Multileader Defined Height
Post by: netelaana on June 01, 2020, 11:24:42 AM
After digging into this a bit more this seems to work ( AutoCAD 2019 ). I would test it out though. I've 'entmodded' mleaders in the past and get some funky results.
Code - Auto/Visual Lisp: [Select]
  1. (defun c:foo (/ s)
  2.   ;; RJP » 2019-01-16
  3.   ;; Reset mleader textbox height
  4.   (if (setq s (ssget ":L" '((0 . "multileader"))))
  5.     (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
  6.       (entmod (subst '(44 . 0.0) (assoc 44 (entget e)) (entget e)))
  7.     )
  8.   )
  9.   (princ)
  10. )

you have no idea how many hours of tedium you just saved. Thanks!
Title: Re: Change Multileader Defined Height
Post by: ronjonp on June 01, 2020, 12:32:27 PM
After digging into this a bit more this seems to work ( AutoCAD 2019 ). I would test it out though. I've 'entmodded' mleaders in the past and get some funky results.
Code - Auto/Visual Lisp: [Select]
  1. (defun c:foo (/ s)
  2.   ;; RJP » 2019-01-16
  3.   ;; Reset mleader textbox height
  4.   (if (setq s (ssget ":L" '((0 . "multileader"))))
  5.     (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
  6.       (entmod (subst '(44 . 0.0) (assoc 44 (entget e)) (entget e)))
  7.     )
  8.   )
  9.   (princ)
  10. )

you have no idea how many hours of tedium you just saved. Thanks!

Glad to help!  :-)
Title: Re: Change Multileader Defined Height
Post by: Mau Cabrera on May 25, 2021, 10:13:04 AM
After digging into this a bit more this seems to work ( AutoCAD 2019 ). I would test it out though. I've 'entmodded' mleaders in the past and get some funky results.
Code - Auto/Visual Lisp: [Select]
  1. (defun c:foo (/ s)
  2.   ;; RJP » 2019-01-16
  3.   ;; Reset mleader textbox height
  4.   (if (setq s (ssget ":L" '((0 . "multileader"))))
  5.     (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
  6.       (entmod (subst '(44 . 0.0) (assoc 44 (entget e)) (entget e)))
  7.     )
  8.   )
  9.   (princ)
  10. )


Yeah, I'm that kind of CAD user who will get unbearably bothered by things that don't really matter that much such as mleader grips that are lower than the actual text box.

You just saved me so much time with your gorgeous routine. Thank you endlessly.
Title: Re: Change Multileader Defined Height
Post by: ronjonp on May 25, 2021, 10:22:32 AM
After digging into this a bit more this seems to work ( AutoCAD 2019 ). I would test it out though. I've 'entmodded' mleaders in the past and get some funky results.
Code - Auto/Visual Lisp: [Select]
  1. (defun c:foo (/ s)
  2.   ;; RJP » 2019-01-16
  3.   ;; Reset mleader textbox height
  4.   (if (setq s (ssget ":L" '((0 . "multileader"))))
  5.     (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
  6.       (entmod (subst '(44 . 0.0) (assoc 44 (entget e)) (entget e)))
  7.     )
  8.   )
  9.   (princ)
  10. )


Yeah, I'm that kind of CAD user who will get unbearably bothered by things that don't really matter that much such as mleader grips that are lower than the actual text box.

You just saved me so much time with your gorgeous routine. Thank you endlessly.
Glad you can use it :)
Title: Re: Change Multileader Defined Height
Post by: Jedi Leba on March 07, 2023, 05:37:58 PM
After digging into this a bit more this seems to work ( AutoCAD 2019 ). I would test it out though. I've 'entmodded' mleaders in the past and get some funky results.
Code - Auto/Visual Lisp: [Select]
  1. (defun c:foo (/ s)
  2.   ;; RJP » 2019-01-16
  3.   ;; Reset mleader textbox height
  4.   (if (setq s (ssget ":L" '((0 . "multileader"))))
  5.     (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
  6.       (entmod (subst '(44 . 0.0) (assoc 44 (entget e)) (entget e)))
  7.     )
  8.   )
  9.   (princ)
  10. )


Yeah, I'm that kind of CAD user who will get unbearably bothered by things that don't really matter that much such as mleader grips that are lower than the actual text box.

You just saved me so much time with your gorgeous routine. Thank you endlessly.
Glad you can use it :)

My thanks as well - this has bugged me for so long and I just want to let you know how much it is appreciated! Everyone in my office is appreciative as well, it just didn't bug them enough to make them find the solution. :-)