求 人帮忙分下代码出现溢出错误
CPoint cpt;::GetCursorPos(&cpt);
Acad::ErrorStatus status;
AcDbDatabase *pNewDb=NULL;
AcDbDatabase *pDbBack = new AcDbDatabase(Adesk::kFalse);;
status = pDbBack->readDwgFile(filepath);
status = pDbBack->wblock(pNewDb);
AcGePoint3d ptTemp = pDbBack->extmin();
AcGePoint3d ptCurrent(cpt.x,cpt.y,0.0);
AcGeVector3d vecTemp(ptCurrent.x-ptTemp.x, ptCurrent.y-ptTemp.y ,ptCurrent.z-ptTemp.z);
AcGeMatrix3d matrTemp;
matrTemp.setToTranslation(vecTemp);
//matrTemp.setToScaling(0.01);
delete pDbBack;
status = acdbHostApplicationServices()->workingDatabase()->insert(matrTemp, pNewDb);
if (pNewDb)
{
delete pNewDb;
pNewDb = NULL;
}
上面的代码是将一个dwg文件中的模型层实体添加当前的数据库中,并增加位移。
报出溢出的错误。
求解各位大虾分析,跟踪半天了。 结贴了。。。。哈哈
页:
[1]