Display full version of the post: %%U
I have a file that I can only use Single Line text in. Some things need to be underlined so I use the control U command. This adds %%U to the contents of the text. My problem is this file is imported into Corel Draw and the %%U causes issues. It will only work ok with %%u. Is there a way to change this command so it adds a little u instead of a capital U? Or is there any way to find/replace the U with a u?Thanks!
philippe JOSEPH
06.08.2020, 11:36
Helo marie_b, try the command FIND or _FIND. It works with a selection of entities or with all the drawing.
Thanks for the reply.That does not work because it is a code and not actually recognized as text.
Kent Cooper
12.08.2020, 14:43
Try this:(defun C:Utou (/ ss n txt str) (if (setq ss (ssget "_X" '((1 . "*%%U*")))) (repeat (setq n (sslength ss)); then (setq txt (ssname ss (setq n (1- n))) str (getpropertyvalue txt "TextString") ); setq (while (wcmatch str "*%%U*") (setq str (vl-string-subst "%%u" "%%U" str)) ); while (setpropertyvalue txt "TextString" str) ); repeat ); if (princ)); defunMinimally tested. [Curiously under these circumstances, but typically for defined commands, the command name is not case-sensitive.]
I don't know much about programming. What exactly do I do with it?
Never mind, I got it figured out. And it works!Thank you from the whole support team!