TheSwamp
CAD Forums => CAD General => Topic started by: Rotring on October 15, 2004, 01:02:46 AM
-
Is there a way in Acad 2005 when using qleader, to set 'annotation type' to none without going through the dialog box and have that as a default setting?
-
Don't I wish.. I tried figuring that one out myself for a few days.. I don't see any way that you can execute the command from the command line, therein lies my problem..
-
I don't know about 2005, but I have two custom buttons that I use...
^C^Cleader;\\;;n;
^C^Cleader;\\\;;n;
-
Real cadd operators don't use buttons.. :D
-
That's a low blow there Paul .....
It seems to me that I remember something about the qleader settings being stored in a dictionary in the drawing... cannot remember where I saw that ... maybe we could investigate...
EDITED .....
The dictionary that the data is stored in is AcadDim ...
You can retrieve it by ....
(dictsearch (dictobjname) "AcadDim")
You can also entmod it from there ...
A few of the DXF group codes I have explored are:
62 = Left alignment 0-4
63 = Right alignment 0-4
65 = Leader type 0 = line 1 = spline
67 = number of segments > 0
40 = annotation width
I have not looked at the other info, but I am sue with a little time you can figure the rest out....
-
Try this
(acet-ql-set '((60 . 4)))
;;
;; qlset.lsp - example initialization of QLEADER settings
;; Frank Whaley Autodesk, Inc.
;; Two functions are included in this file:
;;
;; (acet-ql-get)
;; Returns an association list containing the current QLEADER
;; settings from the Named Object Dictionary.
;;
;; (acet-ql-get <alist>)
;; 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 . 0) (61 . 1)
(62 . 1) (63 . 3) (64 . 0) (65 . 0)
(66 . 0) (67 . 3) (68 . 1) (69 . 0)
(70 . 0) (71 . 0) (72 . 0) (170 . 0) )
)
)
(defun acet-ql-set (arg / cur prm)
(setq cur (acet-ql-get)); fetch current
;; override per argument
(while arg
(setq prm (car arg)
arg (cdr arg)
cur (subst prm (assoc (car prm) cur) cur) )
;; handle DIMLDRBLK
(if (= 3 (car prm))
(setvar "DIMLDRBLK" (cdr prm)) )
)
;; put back
(dictremove (namedobjdict) "AcadDim")
(setq cur (append '((0 . "XRECORD")(100 . "AcDbXrecord")(90 . 990106)) cur))
(dictadd (namedobjdict) "AcadDim" (entmakex cur))
(acet-ql-get)
)
(princ); load quietly
-
I just knew that CAB would have something up his sleeve....
-
Can't always create em, but I got quite a library of borrowed code.
Almost as much as t-bear. :)
-
Thanks guys (and gals)