我已经使用数据库打开了DWG图纸,但现在要得到图纸的尺寸,不知道如何得到???? 请高手指点............. 以下代码有错: DwExportParams params; OdDbExtents sizeDB; // 但OdDbExtents找不到对象????不明白为什么???? double xSize, ySize;
sizeDB.addBlockExt(dataBase->getModelSpaceId().safeOpenObject(OdDb::kForRead));
xSize = sizeDB.maxPoint().x - sizeDB.minPoint().x; ySize = sizeDB.maxPoint().y - sizeDB.minPoint().y;
params.pDb = dataBase; params.sDwfFileName = OdString(nameFile);
params.bInkedArea = false; params.bColorMapOptimize = false;
params.Format = DW_ASCII; params.Version = nDwf_v42; params.xSize = (long)xSize; params.ySize = (long)ySize; |