Breaking a Qleader

Breaking a Qleader

Vinayv4v
Advisor Advisor
2,766 Views
11 Replies
Message 1 of 12

Breaking a Qleader

Vinayv4v
Advisor
Advisor

Hi,

 

I have a question? Is there anyway to break a QLEADER without exploding it and using break. DIMBREAK can be used in MLEADER.

But for a QLEADER is there a way to break it in any of the latest versions?

Cheers,

Vinay Vijayakumaran

0 Likes
2,767 Views
11 Replies
Replies (11)
Message 2 of 12

KimBrunz
Advocate
Advocate

No I don't think you can, that is one of the differences between a Leader and an Mleader.  You can use a program to convert your Leaders to Mleaders than break them.

 

 

See attached code written by Jeffery Allen (2007) which will convert Leaders to Mleaders.

 

Kim

 



-------------------------------------------------
Windows 10 Pro 64 bit
Currently PDS 2018 but testing alternatives
i7 3770k 16 Gb RAM GTX 1070
0 Likes
Message 3 of 12

Vinayv4v
Advisor
Advisor

Hi Kim,

 

If I convert it into an mleader then I can apply Dimensionbreak. But what if I want the text to appear like this in a mleader (above the line).

i29^cimgpsh_orig.JPG

Because this is the standard in my drawing. Text above the leader. 

Cheers,

Vinay Vijayakumaran

0 Likes
Message 4 of 12

KimBrunz
Advocate
Advocate

Mleader Style Manager:

Set Current Style Type:

Modify:

Content Tab:

Leader connection at bottom:

For attachment in the drop downs select Underline top line.

 

 

Kim



-------------------------------------------------
Windows 10 Pro 64 bit
Currently PDS 2018 but testing alternatives
i7 3770k 16 Gb RAM GTX 1070
Message 5 of 12

Vinayv4v
Advisor
Advisor

Hello Kim,

 

Thanks for your suggestion. But I have plenty of drawings each containing 20 to 40 Qleaders which needed to be Break. So converting one at a time with this Lisp is not practical and would take so much time. Any other suggestion. A lisp for converting selected qleaders with nearby text or something.

Cheers,

Vinay Vijayakumaran

0 Likes
Message 6 of 12

pendean
Community Legend
Community Legend
>>>...Any other suggestion...<<<
What you want is not available for the old and untouched QLEADER.
0 Likes
Message 7 of 12

john.vellek
Alumni
Alumni

HI @Vinayv4v,

 

I agree that this would be tedious if you had to do it one at a time. Perhaps, if you like, I can move this thread to the Customization forum to see if someone can help you modify the original lisp routine to try and find the text associated with the leader. Maybe this can be done by proximity or by window selection or by allowing the routine to take the selection of both entities at once in some other fashion.

 

Let me know if you would like the thread moved.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 8 of 12

Vinayv4v
Advisor
Advisor

Hi John,

 

It could be really helpful if you can move the thread to the customization forum. Maybe I could get some help from there.

Thank you Dean for the confirmation.

Cheers,

Vinay Vijayakumaran

Message 9 of 12

dbroad
Mentor
Mentor

Google "qleader to mleader".  The first discussion has a program that works.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 10 of 12

hencoop
Advisor
Advisor

This modified version works for me (attachment type is hard coded specific to OP's needs):

;;;LEADER2MULTILEADER
;;;Converts autocad leaders with text or mtext to autocad 2008+ multileaders
;;;created by Jeffery Allen - 11/1/2007
;;;edited by Henry C. Francis - 4/6/2017
;;;
;;;Command defined:	LDR2MLDR

(defun LEADER2MULTILEADER (/              ent1           ent1-gcode
                           ent1-type      leader-pt-list leader-1st-pt
                           leader-2nd-pt  ent2           ent2-gcode
                           ent2-type      text-strg
                          )
  (vl-load-com)
  (princ "\nSelect Leaders: ")
  (princ)
  (setq qldr-ss (ssget '((0 . "LEADER"))))
  (setq cnt 0)
  (while
    (and qldr-ss
         (< cnt (sslength qldr-ss))
    ) ;_ end of and
     (setq ent1       (ssname qldr-ss cnt)
           ldrobj     (vlax-ename->vla-object ent1)
           ent1-gcode (entget ent1)
           ent1-type  (cdr (assoc 0 ent1-gcode))
     ) ;_ end of setq
     (if (= ent1-type "LEADER")
       (progn
         (setq leader-pt-list (member (assoc 10 ent1-gcode) ent1-gcode)
               leader-1st-pt  (cdr (car leader-pt-list))
               leader-2nd-pt  (cdr (cadr leader-pt-list))
               entobj         (vlax-get-property ldrobj 'Annotation)
               arwsize        (vlax-get-property ldrobj 'ArrowheadSize)
               sclfact        (vlax-get-property ldrobj 'ScaleFactor)
         ) ;_ end of setq
         (if entobj
           (setq text-strg      (vlax-get-property entobj 'TextString)
                 ent2           (vlax-vla-object->ename entobj) ;(car (entsel "\nSelect Text or Mtext: "))
                 ent2-gcode     (entget ent2)
                 ent2-type      (cdr (assoc 0 ent2-gcode))
           )
         )
         (COND
           ((= ent2-type "MTEXT")
            (setq enthgt         (vlax-get-property entobj 'Height)
                  entwdt         (vlax-get-property entobj 'Width)
            ))
           ((= ent2-type "TEXT")
            (setq enthgt         (vlax-get-property entobj 'Height)
                  txtbox         (textbox (entget ent2))
                  entwdt         (caadr (textbox (entget ent2)))
            ))
         )
         (if text-strg
           (progn
             (setvar "OSMODE" (boole 7 (getvar "OSMODE") 16384))
                                        ;osnap off

             (setvar "CMDECHO" 0)

             (command "_.ERASE"     ent1          ent2
                      ""            "_.MLEADER"   leader-1st-pt
                      leader-2nd-pt text-strg
             ) ;_ end of command
             (setq newmldr (entlast)
                   newobj  (vlax-ename->vla-object newmldr)
             )
             (IF newobj
               (progn
                 (vlax-put-property newobj 'TextHeight enthgt)
                 (vlax-put-property newobj 'TextWidth entwdt)
                 (vlax-put-property newobj 'ArrowheadSize (* arwsize sclfact))
                 (vlax-put-property newobj 'TextBottomAttachmentType 0)
                 (vlax-put-property newobj 'TextLeftAttachmentType 7)
                 (vlax-put-property newobj 'TextRightAttachmentType 7)
               )
             )
             (setvar "CMDECHO" 1)
             (setvar "OSMODE" (boole 2 (getvar "OSMODE") 16384))
                                        ;osnap on
           ) ;_ end of progn
           (progn
             (princ "\nLeader has no annotation attached to it! ")
             (princ)
           )
         )
       ) ;_ end of progn
     ) ;_ end of if
     (setq cnt (1+ cnt))
  ) ;_ end of while
  (princ)
)
(DEFUN c:ldr2mldr ()
  (LEADER2MULTILEADER)
)
(princ "Leader 2 Multileader loaded...")
(princ)

  

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Version: 13.6.1963.0 Civil 3D 2024.4.1 Update Built on: U.202.0.0 AutoCAD 2024.1.6
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
Message 11 of 12

scot-65
Advisor
Advisor

You mentioned a dimension break?

A bandage for your thoughts.

 

???

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 12 of 12

hencoop
Advisor
Advisor
I understood that the OP wanted to use DIMBREAK ON his leaders but it does not work with leaders so converting them to multileaders was to make DIMBREAK work with them.
AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Version: 13.6.1963.0 Civil 3D 2024.4.1 Update Built on: U.202.0.0 AutoCAD 2024.1.6
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
0 Likes