乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 50|回复: 4

[编程交流] QLeader Setup Lisp - AutoCAD 1

[复制链接]

5

主题

22

帖子

17

银币

初来乍到

Rank: 1

铜币
25
发表于 2022-7-6 07:20:18 | 显示全部楼层 |阅读模式
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!
 
 
  1. (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)  ));;
回复

使用道具 举报

26

主题

1495

帖子

20

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
118
发表于 2022-7-6 07:36:04 | 显示全部楼层
I had to laugh after I first read this.  Neither Release 12 or Release 13 had QLEADER commands.  However 2012 & 2013 both have it.  I'm showing my age....
 
Sorry but I can't help you.  -David
回复

使用道具 举报

5

主题

22

帖子

17

银币

初来乍到

Rank: 1

铜币
25
发表于 2022-7-6 08:01:02 | 显示全部楼层
lol...I guess I will edit the post a little to make it a little clearer. Thanks for looking
回复

使用道具 举报

10

主题

895

帖子

887

银币

初来乍到

Rank: 1

铜币
49
发表于 2022-7-6 08:08:38 | 显示全部楼层
Do yourself a favor and move to mleaders, you will quickly forget all about qleader.
回复

使用道具 举报

44

主题

3166

帖子

2803

银币

中流砥柱

Rank: 25

铜币
557
发表于 2022-7-6 08:28:17 | 显示全部楼层
 
I mostly agree with moving to MLeader in lieu of QLeader... The one thing that irks me is functionality that QLeader had, not being possible with MLeader, such as when you want to reposition the QLeader's MText, you could use the Move command on the MText and use the QLeader End & Mid points... Not so with MLeader.
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-10 05:02 , Processed in 0.342875 second(s), 62 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表