
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to read the dynamic block properties of a dynamic block.
I'm sure the block is a dynamic block, but the helper methods tell me it's not: (I have verified this with MdgDbg on Windows)
ads_name ssname;
acedSSGet(NULL, NULL, NULL, NULL, ssname);
Adesk::Int32 length = 0;
acedSSLength(ssname, &length);
ads_name ent;
AcDbObjectId id = AcDbObjectId::kNull;
for (long i = 0; i < length; i++) {
if (acedSSName(ssname, i, ent) != RTNORM) continue;
if (acdbGetObjectId(id, ent) != Acad::eOk) continue;
AcDbEntity* pEnt = NULL;
if (acdbOpenAcDbEntity(pEnt, id, AcDb::kForWrite) != Acad::eOk) continue;
AcDbBlockReference* block = AcDbBlockReference::cast(pEnt);
if (AcDbDynBlockReference::isDynamicBlock(id)) {
acutPrintf(_T("\nID is dynamic block"));
}
if (AcDbDynBlockReference::isDynamicBlock(block->objectId())) {
acutPrintf(_T("\nObject ID is dynamic block"));
}
if (AcDbDynBlockReference::isDynamicBlock(block->blockTableRecord())) {
acutPrintf(_T("\nBlock Table Record is dynamic block"));
}
}
According to the docu I need to pass the blockTableRecord object id.
Does anyone have an idea what the issue could be?
Thanks
BR
Solved! Go to Solution.