![]() |
【转帖】mtext with over 80 chars in a row
mtext with over 80 chars in a row
mtext with over 80 chars in a row hallo, i can't create a mtext (as part of insert of block) with over 80 characters in a row. i get always more rows as i wrote. odstring odtext; // frist row with 90 chars: odtext += odstring("1234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789" ); odtext += odstring(oddbmtext:aragraphbreak()); // second row with 90 chars: odtext += odstring("1234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789" ); odtext += odstring(oddbmtext:aragraphbreak()); // third row with 90 chars: odtext += odstring("1234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789" ); odtext += odstring(oddbmtext:aragraphbreak()); // last odtext += odstring("abc"); oddbmtextptr pmtxt = oddbmtext::createobject(); .... pmtxt->setcontents(odtext); the result is a mtext with 6 rows! :-( all characters after "abc" are false. this rows comes from previous rows. it not appears, if they are only 80 characters per row. we use dd 2.*1.*0. please help thank you. hello heinz, check your setings pmtxt->width(). in case pmtxt->width() * 10.0 <= pmtxt->textheight() mtext doesn't break lines automatically. best regards, sergey z. mtext invents new textrows hello sergey, the lines-breaks are okay. the problem is, that the mtext invents new textrows with new content (append): source (ending with abc): 1234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789 1234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789 1234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789 abc result: 1234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789 1234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789 1234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789 abc01234567890 1234567890123456789012345678901234567890123456789 1234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789 1234567890123456789012345678901234567890 1234567890123456789012345 -> the last bold rows are false. you can see it in the resulting dxf-file: ... 3 1234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789\ p1234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789\ p1234567890123456789012345678901234567890 1234567890123456789012345 1 678901234567890123456789\pabc01234567890 1234567890123456789012345678901234567890123456789\ p1234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789\ p1234567890123456789012345678901234567890 1234567890123456789012345 7 arial .... if i set the textwidth = textheight() /10, so is the result identical. can you understand it? is it not a error in dd? thanks heinz hello heinz, i understand your problem. it was bug in dwgdirect 2.1.0 and it was fixed in dwgdirect 2.2.0. best regards, sergey z. |
所有的时间均为北京时间。 现在的时间是 11:23 AM. |