Greetings everyone!
I have a lisp that was found a few years ago(possibly on this site) that would change qleader settings on the fly. It has worked flawlessly until we upgraded from AutoCAD 2012 to 2013. It no longer will set the the Annotation Type, Leader Line or Number of Points.
If someone has any suggestions on how to modify the lisp it would be greatly appreciated!
(defun c:nldr() (acet-ql-set '((60 . 4)(65 . 0)(66 . 1)(70 . 0)(71 . 0))) (SETVAR "DIMLDRBLK" ".") (command "QLEADER"))(defun c:aldr() (acet-ql-set '((60 . 4)(65 . 0)(66 . 1)(70 . 0)(71 . 0))) (SETVAR "DIMLDRBLK" "LOOP") (command "QLEADER"))(defun c:hr() (acet-ql-set '((60 . 4)(65 . 1)(66 . 0)(67 . 3)(70 . 0)(71 . 0))) (SETVAR "DIMLDRBLK" ".") (command "QLEADER"));;;; 2.19.2002 Rob Tomson;; (acet-ql-get);; Returns an association list containing the current QLEADER;; settings from the Named Object Dictionary.;;;; (acet-ql-get );; Sets the specified values for QLEADER settings from the given;; association list. Returns an association list containing the;; new values.;;;; These functions can be used to examine the current QLEADER;; settings, or to initialize the setting before using the QLEADER;; command. For example, to use splined leaders and framed text:;;;; (acet-ql-set '((65 . 1)(72 . 1)));;;; Both functions use the following group codes to identify QLEADER;; settings:;;;; 3: user arrowhead block name (default="");; 40: default text width (default=0.0);; 60: annotation type (default=0);; 0=MText;; 1=copy object;; 2=Tolerance;; 3=block;; 4=none;; 61: annotation reuse (default=0);; 0=none;; 1=reuse next;; 62: left attachment point (default=1);; 63: 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: underline bottom line (default=0);; 65: use splined leader line (default=0);; 66: no limit on points (default=0);; 67: maximum number of points (default=3);; 68: prompt for MText width (word wrap) (default=1);; 69: always left justify (default=0);; 70: allowed angle, first segment (default=0);; 71: allowed angle, second segment (default=0);; 0=Any angle;; 1=Horizontal;; 2=90deg;; 3=45deg;; 4=30deg;; 5=15deg;; 72: frame text (default=0);; 170: active tab (default=0);; 0=Annotation;; 1=Leader Line & Arrow;; 2=Attachment;; 340: object ID for annotation reuse;;(defun acet-ql-get (/ xr cod itm reply) (if (setq xr (dictsearch (namedobjdict) "AcadDim")) (progn (foreach cod '(3 40 60 61 62 63 64 65 66 67 68 69 70 71 72 170 340)(if (setq itm (assoc cod xr)) (setq reply (append reply (list itm)))) ) reply ) '((3 . "") (40 . 0.0) (60 . 4) (61 . 0) (62 . 1) (63 . 1) (64 . 0) (65 . 0) (66 . 0) (67 . 3) (68 . 0) (69 . 0) (70 . 0) (71 . 2) (72 . 0) (170 . 0) ) ))(defun acet-ql-set (arg / cur prm) (setq cur (acet-ql-get)) (while arg (setq prm (car arg) arg (cdr arg) cur (subst prm (assoc (car prm) cur) cur) ) (if (= 3 (car prm)) (setvar "DIMLDRBLK" (cdr prm)) ) ) (dictremove (namedobjdict) "AcadDim") (setq cur (append '((0 . "XRECORD") (100 . "AcDbXrecord") (90 . 990106)) cur) ) (dictadd (namedobjdict) "AcadDim" (entmakex cur)) (acet-ql-get))(princ)(acet-ql-set '((3 . "") (40 . 0.0) (60 . 4) (61 . 0) (62 . 1) (63 . 1) (64 . 0) (65 . 0) (66 . 0) (67 . 3) (68 . 0) (69 . 0) (70 . 0) (71 . 2) (72 . 1) (170 . 0) ));;