![]() |
【转帖】problem with getting extents of a oddbtable cell
problem with getting extents of a oddbtable cell
problem with getting extents of a oddbtable cell hi, we have a problem with getting extents of a table cell. please see this code (dwgdirect 1.14.02): code: odgepoint3d pt = odgepoint3d(100.0,100.0,0.0); oddbobjectid idtabletemp; oddbdatabaseptr pdb = getdocument()->m_pdb; { //create a table object oddbblocktablerecordptr precord = pdb->getactivelayoutbtrid().safeopenobject(); pdb->getactivelayoutbtrid().safeopenobject(oddb::kforwrite); oddbtableptr ptable = oddbtable::createobject(); ptable->setdatabasedefaults(precord->database()); //set some properties ptable->setnumrows(3); ptable->setnumcolumns(3); ptable->generatelayout(); ptable->setposition(pt); ptable->setcolumnwidth(500.0); ptable->setrowheight(500.0); //append the table object to the blocktablerecord oddbobjectid tableid = precord->appendoddbentity(ptable); idtabletemp = tableid; } { bool isoutercell = false; odgepoint3darray pts; //get a table object oddbtableptr ptable = idtabletemp.safeopenobject(oddb::kforwrite); for(unsigned int nrow = 0; nrow < ptable->numrows(); nrow++) for(unsigned int ncolumn = 0; ncolumn < ptable->numcolumns(); ncolumn++) { //get cellextends ptable->getcellextents(nrow,ncolumn,isoutercell,pts); } std::stringstream ss; ss<<"z-coordinates are : "; for(unsigned int i = 0 ; i<pts.size(); i++) { ss<<pts[i].z<<" "; } ::afxmessagebox(ss.str().c_str()); //=============> notice that the z-coordinates of the extends points are not initialized. } is it a bug of dwgdirect? thanks in advance for any help. best regards chudomir it is really bug in dwgdirect. it will be fixed in next release. thank you for report. best regards, sergey z. |
所有的时间均为北京时间。 现在的时间是 10:45 AM. |