Qleader

Discussion in 'AutoCAD' started by HDC, Apr 5, 2005.

  1. HDC

    HDC Guest

    I need help in How to control "QLeader" via lisp?
    or if you have a lisp file for it and if you willing ot share it, welcome!.

    Thank you in advance

    hdc
     
    HDC, Apr 5, 2005
    #1
  2. HDC

    HDC Guest

    Thank you Gascap:

    Which version of AutoCAD do you use?
    I got some errors, i will check them.

    But that is what i was looking for..

    Thank a lot..

    HDC
     
    HDC, Apr 5, 2005
    #2
  3. HDC

    Jürg Menzi Guest

    Hi HDC

    That's what I use to control the settings of Qleaders:
    Code:
    (defun MeGetQleader ( / CurDic CurItm RetVal)
    (if (setq CurDic (dictsearch (namedobjdict) "AcadDim"))
    (progn
    (foreach memb '(3 40 60 61 62 63 64 65 66 67 68 69 70 71 72 170 340)
    (if (setq CurItm (assoc memb CurDic))
    (setq RetVal (cons CurItm RetVal))
    )
    )
    (reverse RetVal)
    )             ;-Group codes for settings:
    '((3 . "")    ; User arrowhead block name (default="")
    (40 . 0.0)  ; Default text width (default=0.0)
    (60 . 0)    ; Annotation type (default=0):
    ;  0=MText
    ;  1=Copy object
    ;  2=Tolerance
    ;  3=Block
    ;  4=None
    (61 . 0)    ; Annotation reuse (default=0):
    ;  0=Off
    ;  1=On
    (62 . 1)    ; Left attachment point (default=1):
    ;  0=Top of top line
    ;  1=Middle of top line
    ;  2=Middle of multiline text
    ;  3=Middle of bottom line
    ;  4=Bottom of bottom line
    (63 . 3)    ; Right attachment point (default=3):
    ;  0=Top of top line
    ;  1=Middle of top line
    ;  2=Middle of multiline text
    ;  3=Middle of bottom line
    ;  4=Bottom of bottom line
    (64 . 0)    ; Underline bottom line (default=0):
    ;  0=Off
    ;  1=On
    (65 . 0)    ; Use splined leader line (default=0):
    ;  0=Off
    ;  1=On
    (66 . 0)    ; No limit on points (default=0):
    ;  0=Off
    ;  1=On
    (67 . 3)    ; Maximum number of points (default=3)
    (68 . 1)    ; Prompt for MText width (word wrap) (default=1):
    ;  0=Off
    ;  1=On
    (69 . 0)    ; Always left justify (default=0):
    ;  0=Off
    ;  1=On
    (70 . 0)    ; Allowed angle, first segment (default=0):
    ;  0=Any angle
    ;  1=Horizontal
    ;  2=90°
    ;  3=45°
    ;  4=30°
    ;  5=15°
    (71 . 1)    ; Allowed angle, second segment (default=0):
    ;  0=Any angle
    ;  1=Horizontal
    ;  2=90°
    ;  3=45°
    ;  4=30°
    ;  5=15°
    (72 . 0)    ; Frame text (default=0):
    ;  0=Off
    ;  1=On
    (170 . 0)   ; Active tab for settings (default=0):
    ;  0=Annotation
    ;  1=Leader Line & Arrow
    ;  2=Attachment
    ;   (340 . ID)  ; Object ID for annotation reuse
    )
    )
    )
    ;
    ; -- Qleader Dictionary setzen
    ;
    (defun MeSetQleader (Lst / DicLst)
    (dictremove (namedobjdict) "AcadDim")
    (setq DicLst (append
    '((0 . "XRECORD") (100 . "AcDbXrecord") (90 . 990106))
    Lst
    )
    )
    (dictadd (namedobjdict) "AcadDim" (entmakex DicLst))
    (princ)
    )
    
    Cheers
     
    Jürg Menzi, Apr 5, 2005
    #3
  4. HDC

    Gascap Guest

    Hi HDC,

    Yes, you need to make sure you have the layers created in the drawing that
    the routine is looking for (i.e ANO..or whatever you may change that to
    inside the routine.)

    We're using '05, but I wrote it in '04. I think the setting 'dimldrblk' was
    new to '04, so the posted routine may not work prior to that release.

    Good luck!

    GC
     
    Gascap, Apr 5, 2005
    #4
  5. HDC

    HDC Guest

    Thank you Jürg:
    That is nice, is straight forward to the values
    Nice, thank again.
    I know i can count with you guys...

    HDC
     
    HDC, Apr 5, 2005
    #5
  6. HDC

    Jürg Menzi Guest

    Welcome...¦-)

    Cheers
     
    Jürg Menzi, Apr 6, 2005
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.