Message 1 of 5
Help me with mtexts and text string

Not applicable
03-02-2008
04:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to iterate through the mtexts of a given drawing and export them to Excel.suppose that there is an mtext in the drawing named mtextobj in which "sample" is written in the first line and "note" is written in the 2nd.this would be read as "sample note". i use TextString property:
.
.
Dim mtextobj As AcadMText
MsgBox mtextobj .TextString
.
.
and autocad returns "sample\Pnote". this is appropriate for me.
the problem is when text formatting of this mtext is changed.for example if i double click on the mtext and in the Text Formatting box change the color to red,autocad returns
{\C1;sample\Pnote}
or if i change the font to verdana it gives
{\fVerdana|b0|i0|c0|p34;sample\fVerdana|b0|i0|c178|p34;\P\fVerdana|b0|i0|c0|p34;note}
How can i access to the real content inside the mtext? and get rid of this string which is merged with text formatting data?
any help is highly appreciated... Message was edited by: arman88
.
.
Dim mtextobj As AcadMText
MsgBox mtextobj .TextString
.
.
and autocad returns "sample\Pnote". this is appropriate for me.
the problem is when text formatting of this mtext is changed.for example if i double click on the mtext and in the Text Formatting box change the color to red,autocad returns
{\C1;sample\Pnote}
or if i change the font to verdana it gives
{\fVerdana|b0|i0|c0|p34;sample\fVerdana|b0|i0|c178|p34;\P\fVerdana|b0|i0|c0|p34;note}
How can i access to the real content inside the mtext? and get rid of this string which is merged with text formatting data?
any help is highly appreciated... Message was edited by: arman88