HELP! Can not set Block Table Record variable.

HELP! Can not set Block Table Record variable.

Anonymous
Not applicable
297 Views
2 Replies
Message 1 of 3

HELP! Can not set Block Table Record variable.

Anonymous
Not applicable
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;
}
0 Likes
298 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
I suspect that you are just confused by what you see in the debugger, and
the value is correct. 🙂
--
Owen Wengerd
President, ManuSoft <>
VP Americas, CADLock, Inc. <>


"tuankm" wrote in message news:5781819@discussion.autodesk.com...
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.
[...]
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thanks Owen,
I just find out that in my problem is not occurred here. The problem is I have not save/restore this variable in the DWGIN/OUT rountine.
Regards.

PROBLEM SOLVED. THANK FOR ATTENTION. ------
Kieu Minh Tuan
DCL&LSP Generator
http://dclgenerator.co.nr
0 Likes