Author Topic: [XDrX-PlugIn(29)] Modify Mleader Text height (can be modified by Scale)  (Read 747 times)

0 Members and 1 Guest are viewing this topic.

xdcad

  • Bull Frog
  • Posts: 424
Code - Auto/Visual Lisp: [Select]
  1. (defun c:tt ()
  2.   (if (and
  3.         (xdrx-initget "0 1")
  4.         (setq mode (getkword "\nMode[Scale(0)/Height(1)]<Exit>:"))
  5.         (xdrx-initget)
  6.         (cond
  7.           ((= mode "0")
  8.            (setq scl (getreal "\nEnter text scaling <exit>:"))
  9.           )
  10.           ((= mode "1")
  11.            (setq height (getreal "\nsEnter leader text height <exit>:"))
  12.           )
  13.           (t
  14.            nil
  15.           )
  16.         )
  17.         (setq ss (xdrx-ssget
  18.                    "\nSelect The MLeader <Exit>:"
  19.                    '((0 . "m*leader"))
  20.                  )
  21.         )
  22.       )
  23.     (progn
  24.       (xdrx-begin)
  25.       (setq nums (sslength ss))
  26.       (mapcar '(lambda (x)
  27.                  (setq h (xdrx-getpropertyvalue x "textheight"))
  28.                  (if (= mode "0")
  29.                    (setq h (* scl h))
  30.                    (setq h height)
  31.                  )
  32.                  (xdrx-setpropertyvalue x "textheight" h)
  33.                )
  34.               (xdrx-ss->ents ss)
  35.       )
  36.       (xdrx-prompt
  37.         "\nSuccessfully Processing "
  38.         nums
  39.         "Mleader Leaderline."
  40.       )
  41.       (xdrx-end)
  42.     )
  43.   )
  44.   (princ)
  45. )
The code I wrote uses XDRX-API,which can be downloaded from github.com and is updated at any time.
===================================
[XDrx-Sub Forum]
https://www.theswamp.org/index.php?board=78.0
https://github.com/xdcad/XDrx-API
http://bbs.xdcad.net