This project has moved and is read-only. For the latest updates, please go here.

problem with crlf in Mtext

Jun 19, 2017 at 8:35 AM
Edited Jun 19, 2017 at 9:51 AM
Good morning to evereybody, I'm new user of this useful tools.
I have to generate multiline text using vb .net
Reading dxf files already written with my cad tool (CADRA) i found that crlf symbol is translated with "\" character.
An example in c#
MText mtext1 = new MText("AAAA\PPPP", new Vector2(0, 30), 10, 0);

It seems that \ sequence "eats" the next character:

The same if I to use visual basic .net
Dim c As New MText("AAAA\PPPP", New Vector2(0, 10), 10, 0.0)

I have not to double the \ sequence (if not I will get exacly AAAA\BBBB) but the result is the same

Furthermore if there are several lines (\ sequences)it seems doesn't work neither in c# nor in visula basic
Jun 22, 2017 at 11:20 PM
Edited Jun 30, 2017 at 1:35 AM
The MText uses its own codes to specify stuff like font, color, size,... and in your case the new paragraph code is "\\P" or if you use verbatim strings @"\P". Take a look at the documentation and code of the classes MText and MTextFormattingOptions they might throw some light into your issue.

Jun 29, 2017 at 11:32 AM
Thanks it works fine