Message 1 of 3
HELP! Can not set Block Table Record variable.

Not applicable
11-19-2007
10:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I'm trying to create one custom object, in which I want to store AcDbHardPointerId variable to store block table record Id.
When ever I try to set this variable by the following code, I alway get kNull in m_DefaulBlockPointer (m_DefaulBlockPointer= {kNull={...},nId = 0x7edfafdf});
m_DefaulBlockPointer is class member variable of AcDbHardPointerId type.
Can anyone help?
Thanks.
Acad::ErrorStatus MyObj::setDefaulBlockbyName (const ACHAR* blockname){
assertWriteEnabled();
AcDbBlockTable *pblTable;
acdbHostApplicationServices()->workingDatabase()->getBlockTable(pblTable,AcDb::kForRead);
pblTable->getAt(blockname,m_DefaulBlockPointer);
pblTable->close();
return Acad::eOk;
}
I'm trying to create one custom object, in which I want to store AcDbHardPointerId variable to store block table record Id.
When ever I try to set this variable by the following code, I alway get kNull in m_DefaulBlockPointer (m_DefaulBlockPointer= {kNull={...},nId = 0x7edfafdf});
m_DefaulBlockPointer is class member variable of AcDbHardPointerId type.
Can anyone help?
Thanks.
Acad::ErrorStatus MyObj::setDefaulBlockbyName (const ACHAR* blockname){
assertWriteEnabled();
AcDbBlockTable *pblTable;
acdbHostApplicationServices()->workingDatabase()->getBlockTable(pblTable,AcDb::kForRead);
pblTable->getAt(blockname,m_DefaulBlockPointer);
pblTable->close();
return Acad::eOk;
}