查看单个帖子
旧 2009-05-06, 07:36 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】oddbdimensionmeasurement returning -1 or 0 value

oddbdimension::measurement returning -1 or 0 value
oddbdimension::measurement returning -1 or 0 value
hi,
oddbdimension::measurement() is returning -1 or 0 value.sometimes it calculates correctly but most of the time it returns 0 or -1. i am using version 1.12.i tried with many files.is this a bug?
thanks,
singhn
could you provide an example?
sergey slezkin
hi,
here are the files.all of them are giving measurement() value 0 or -1.file 116ro is showing some values correct.only correct.dwg is giving all values correct.also could you please tell me how can i extract scaling factor 4 which is being multiplied to actual values in case of correct.zip.
i am extracting measurement value like this for rotated dimension:
double tempmeasurement;
tempmeasurement=protdim->measurement();
thanks,
singhn
attached files (184.4 kb, 5 views)

values 0 and -1 returned from measurement() is a result of dd bug (it takes place if pre-r15 file is loaded or if r15+ file converted from minor version is loaded).
as a temporary workaround you can call recomputedimblock() in such case.
the value displayed is multiplied by dimlfac value.
both dimstyle and dimension entity have getdimlfac() method (dimension entity may use value from dimstyle or have an override in xdata).
sergey slezkin
now i am getting correct values using recomputdimblock.thanks for all your help,
singh
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)