|
static void CheckDynBlock(void)
{
ACHAR blockName[512];
if (acedGetString(TRUE,采用T("\nBlock name: "), blockName) == RTNORM) {
AcDbBlockTableRecordPointer pBTR(blockName, acdbCurDwg(), AcDb::kForRead);
if (pBTR.openStatus() == Acad::eOk) {
if (AcDbDynBlockReference::isDynamicBlock(pBTR->objectId())) {
acutPrintf(采用T("\nBlock <%s> is dynamic."), blockName);
} else {
acutPrintf(采用T("\nBlock <%s> is not dynamic."), blockName);
}
} else {
acutPrintf(采用T("\nCan not open block <%s>. Error: <%s>"),
blockName, acadErrorStatusText(pBTR.openStatus()));
}
}
} |
|