高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】exception thrown by oddbmtexthorizontalmode90 1.14.02
exception thrown by oddbmtext::horizontalmode() 1.14.02
exception thrown by oddbmtext::horizontalmode() 1.14.02
using version 1.14.02 .net 2003.
i've got problems understanding exceptions thrown while reading a drawing.
i've attached a cropped version only containing one of the hundreds of offending mtext entities.
from the 1.14.02 docs: "oddbmtext::horizontalmode() - returns the horizontal mode of this mtext entity (dxf 72)."
checking the dxf version of this file i find that group code 72 for this entity is 1.
but when i call horizontalmode() to get this group code from the oddbmtext entity an oderror <not applicable> is thrown.
why?
and if this group code isn't applicable... how do i figure out what i'm supposed to set this group code to when i recreate the imported entity?
and disregarding the problem of not knowing the group code, how do i know when it's not safe to call horizontalmode() while extracting data from an oddbmtext entity?
checking the 2007 dxf docs i can see that group code 71 for this entity has a value of 10 that could be out of range and possibly invalid.
attached files
1. documentation contains mistake. dxf 71 value defines both horizontal and vertical modes. valid range is 1-9.
2. the value in file is invalid (10).
3. dd recover does not fix it - should fix (like autocad does).
4. accessors like horizontalmode() and verticalmode() should not throw exceptions in case of invalid data (to be fixed in dd).
as a workaround instead of horizontalmode() and verticalmode() you can use oddbmtext::attachement() which returns dxf 71 value without conversions.
sergey slezkin
|