|
ObjectARX 判断是否是模型空间
[code]static bool IsModelSpace(void)
{
AcDbObjectId idCurrent = acdbCurDwg()->currentSpaceId();
AcDbBlockTablePointer pBT(acdbCurDwg(),AcDb::kForRead);
if (pBT.openStatus() == Acad::eOk) {
AcDbObjectId idModel;
if (pBT->getAt(ACDB_MODEL_SPACE,idModel) == Acad::eOk) {
if (idModel == idCurrent) return true;
}
}
return false;
}[/code] |
|