03-03-2023
02:12 PM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
03-03-2023
02:12 PM
@leandro_miya wrote:
.... Is it possible to change the code for simple Text? If so, what changes should I make? ....
Try this modification -- the red parts are all that I changed [untested]:
(defun C:UT (/ ss n edata); = Underline Text(s)
(if (setq ss (ssget "_:L" '((0 . "TEXT"))))
(repeat (setq n (sslength ss)); then
(setq edata (entget (ssname ss (setq n (1- n)))))
(entmod
(subst
(cons 1 (strcat "%%U" (cdr (assoc 1 edata))))
(assoc 1 edata)
edata
); subst
); entmod
); repeat
); if
(princ)
); defun
If any selected Text object has its entire contents already underlined by the same %%U entry at the beginning, the above will un-underline it. It could be made to check for that, if desired, and not add another %%U.
Kent Cooper, AIA