Files
envi-code/SourceCode/Code2026/CoreCommand/ent2db.h
T
2026-09-28 15:28:50 +08:00

29 lines
471 B
C++

#pragma once
namespace ENT2DB
{
void export2Db();
void importByDb();
void extractSection();
template <class T>
static bool isEntity(AcDbEntity *pEnt)
{
if (!pEnt) return false;
if (pEnt->isKindOf(T::desc())) return true;
return false;
}
template <class T>
static bool isEntity(AcDbObjectId id)
{
AcDbObjectPointer<AcDbEntity> pEnt(id, AcDb::kForRead);
if (pEnt.openStatus() == Acad::eOk)
{
return isEntity<T>(pEnt);
}
return false;
}
}