Message 1 of 6
Adding XData
Not applicable
05-05-2000
03:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to add xdata to objects... however, I keep getting
eRegappIdNotFound.
Could this be because when I am calling
res=acdbRegApp(appname);
That it is in the wrong document's context? I tought I switched to the
correct context via:
AcAxDocLock docLock(pDbNew,AcAxDocLock.DocLockType::kCurDocSwitch);
res from above is RTNORM, but when I call setXData (below), I am getting
eRegappIdNotFound
void appendXData(AcDbEntity* pEnt)
{
AcDbHandle handEnt;
pEnt->getAcDbHandle(handEnt);
char strHandle[17];
Acad::ErrorStatus es;
handEnt.getIntoAsciiBuffer(strHandle);
resbuf* prbX;
prbX=acutBuildList(AcDb::kDxfRegAppName, appname,
AcDb::kDxfXdAsciiString, someString,
RTNONE);
es=pEnt->setXData(prbX);
if(es==Acad::eRegappIdNotFound)
{
acutPrintf("/");
}
else
{
acutPrintf("+");
}
acutRelRb(prbX);
}
eRegappIdNotFound.
Could this be because when I am calling
res=acdbRegApp(appname);
That it is in the wrong document's context? I tought I switched to the
correct context via:
AcAxDocLock docLock(pDbNew,AcAxDocLock.DocLockType::kCurDocSwitch);
res from above is RTNORM, but when I call setXData (below), I am getting
eRegappIdNotFound
void appendXData(AcDbEntity* pEnt)
{
AcDbHandle handEnt;
pEnt->getAcDbHandle(handEnt);
char strHandle[17];
Acad::ErrorStatus es;
handEnt.getIntoAsciiBuffer(strHandle);
resbuf* prbX;
prbX=acutBuildList(AcDb::kDxfRegAppName, appname,
AcDb::kDxfXdAsciiString, someString,
RTNONE);
es=pEnt->setXData(prbX);
if(es==Acad::eRegappIdNotFound)
{
acutPrintf("/");
}
else
{
acutPrintf("+");
}
acutRelRb(prbX);
}