Files
envi-code/SourceCode/Code2026/CoreCommand/ent2db.h
T

29 lines
474 B
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
#pragma once
2026-09-28 15:28:50 +08:00
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;
}
}