本文整理汇总了C++中AcDbEntity::setXData方法的典型用法代码示例。如果您正苦于以下问题:C++ AcDbEntity::setXData方法的具体用法?C++ AcDbEntity::setXData怎么用?C++ AcDbEntity::setXData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcDbEntity
的用法示例。
在下文中一共展示了AcDbEntity::setXData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addXdata
void Additional_Class::addXdata( AcDbObjectId entID, CString xdataStr, CString xdataNameStr )
{
AcDbEntity * pEnt;
struct resbuf * pRb;
if(Acad::eOk != acdbOpenAcDbEntity(pEnt, entID, AcDb::kForWrite))
{
pEnt->close();
return;
}
TCHAR * tempTchar = CString2TCHAR(xdataNameStr);
//TCHAR strAppName[] = tempTchar;
acdbRegApp(tempTchar);
TCHAR * typeName = CString2TCHAR(xdataStr);
struct resbuf * pTemp;
pTemp = pEnt->xData(tempTchar);
pRb = acutBuildList(AcDb::kDxfRegAppName, tempTchar,
AcDb::kDxfXdAsciiString, typeName,
RTNONE);
pEnt->setXData(pRb);
acutRelRb(pRb);
pEnt->close();
return;
}
示例2: shYDsysXDataDel
static void shYDsysXDataDel()
{
ads_name ssName;
if(RTNORM == acedSSGet(":S", NULL, NULL, NULL, ssName))
{
AcDbObjectId tempObjId;
ads_name ssTemp;
long nLen=0;
if(RTNORM != acedSSLength(ssName,&nLen)) return;
for(int j=0; j<nLen; j++)
{
if(RTNORM == acedSSName(ssName,j,ssTemp)) continue;
if(Acad::eOk != acdbGetObjectId(tempObjId, ssTemp)) continue;
AcDbEntity* pEnt = NULL;
if(Acad::eOk == acdbOpenObject(pEnt,tempObjId,AcDb::kForWrite))
{
resbuf* pHead = pEnt->xData(NULL);
if(pHead == NULL)
{
pEnt->close(); continue;
}
resbuf* pNext =pHead->rbnext;
if(pNext == NULL)
{
acutRelRb(pHead); pEnt->close(); continue;
}
while(pNext != NULL)
{
acutRelRb(pHead);
pHead = pNext;
pNext = pNext->rbnext;
}
pEnt->setXData(NULL);
pEnt->close();
}
}
acedSSFree(ssName);
}
}