Insert a line feed in Mtext
I am trying to add a line feed to MTEXT.
The existing mtext looks like this: 10000
I want the resulting text to look like this: 10000
OEL CD
If I look at existing mtext that already has two lines the assoc 1 list is (1 . "10000\\POELCD").
However building the string in lisp with the "\\P" does nothing.
How can I accomplish this? I have been all over the web and found nothing that helps.
Re: Insert a line feed in Mtext
Code:
(defun c:FOO (/ e v)
(vl-load-com)
(if (and (setq e (car (entsel)))
(setq v (vlax-ename->vla-object e))
(wcmatch (vla-get-objectname v) "AcDbMText,AcDbMText"))
(vla-put-textstring
(setq v (vlax-ename->vla-object e))
(strcat (vla-get-textstring v) "\\POEL CD"))
)
(princ)
)
Re: Insert a line feed in Mtext
What's if the selection is not a text ? ;)
Re: Insert a line feed in Mtext
Thanks Renderman!
Tharwat, in this case I don't need the error control.
Re: Insert a line feed in Mtext
Quote:
Originally Posted by
Tharwat
What's if the selection is not a text ? ;)
Quote:
Originally Posted by
mikehaff
Thanks Renderman!
Tharwat, in this case I don't need the error control.
Tharwat is correct... It is not like me to post code like that.
Code corrected.