检测是不是动态块
static void CheckDynBlock(void){
ACHAR blockName;
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()));
}
}
}
页:
[1]