![]() |
【转帖】extent trouble with dwgdirect 2.2
extent trouble with dwgdirect 2.2
extent trouble with dwgdirect 2.2 hi guys ! i have a dwg viewer that can make extentzoom but with the new dwgdirect some drawing are really really zoomed out... my old code with dwgdirect 1.1 was: code: oddbextents ext; ext.addblockext(oddbblocktablerecordptr(pdb->getactivelayoutbtrid().safeopenobject())); my new code with dwgdirect 2.2 is: code: odgeextents3d ext; oddbblocktablerecordptr(pdb->getactivelayoutbtrid().safeopenobject())->getgeomextents(ext); on some drawing i get : ext.minpoint.x = -148349.32463403541 and ext.minpoint.y = -104818.85691896164 and when i look in acad the (0,0,0) point is in the very low left corner of my drawing. so why -148349 !!?. do you have anything else to replace the old oddbextents or any other idea ? thx for your help oddbblocktablerecord::getgeomextents() does not always return the same result as zoom extents operation. for example entities on layer frozen in viewport are not honored while performing zoom extents in viewport but they are included into extents returned by getgeomextents(). to perform zoom extents the better way is using oddbviewport::zoomextents() oddbviewporttablerecord::zoomextents() odabstractviewpe::zoomextents() oddbabstractviewpe is a protocol extention attached to all view-related classes. if zoom extents operation in odamfcapp works incorrectly with your file please attach it. sergey slezkin |
所有的时间均为北京时间。 现在的时间是 08:28 PM. |