本文整理汇总了C++中AcDbEntity::id方法的典型用法代码示例。如果您正苦于以下问题:C++ AcDbEntity::id方法的具体用法?C++ AcDbEntity::id怎么用?C++ AcDbEntity::id使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcDbEntity
的用法示例。
在下文中一共展示了AcDbEntity::id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ObjectXdataFilter
AcDbObjectIdArray Additional_Class::ObjectXdataFilter( CString XdataName, CString Xdata )
{
//// 遍历所有图层符合规则的实体返回ID列表
AcDbObjectIdArray resID;
//AcDbObjectIdArray tempIDList;
AcDbBlockTable *pBlockTable = NULL;
acdbHostApplicationServices()->workingDatabase()->getBlockTable(pBlockTable, AcDb::kForRead);
////this->Open_BlockTable(pBlockTable, NREADMODE);
AcDbBlockTableRecord *pBlockTableRecord = NULL;
pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForWrite);
//AcDbObjectIterator pltr;
AcDbBlockTableRecordIterator * pltr2;
pBlockTableRecord->newIterator(pltr2);
////pBlockTable->newIterator(pltr);
AcDbEntity * pEnt;
CString tempStrEnt;
for (pltr2->start(); !pltr2->done(); pltr2->step())
{
//pltr2.getEntity()
if(Acad::eOk == pltr2->getEntity(pEnt, AcDb::kForRead, false))
{
pEnt->close();
tempStrEnt = Get_Xdata(pEnt->id(), XdataName);
if (tempStrEnt == Xdata)
{
resID.append(pEnt->id());
}
}
//pEnt->close();
}
pEnt->close();
pBlockTable->close();
pBlockTableRecord->close();
delete pltr2;
return resID;
}