对实体的克隆
if (sNameCustom==_T("数量"))
{
int iNum = _ttoi(sValueCustom);
AcDbEntity *pEnt;
acdbOpenAcDbEntity(pEnt, pId, AcDb::kForRead);
for (int i = 1; i < iNum;i++)
{
AcRxObject *pObj = NULL;
pObj = pEnt->clone();
AcDbEntity *pEntT = static_cast<AcDbEntity*>(pObj);
AppendToModelSpace(pEntT, true, pDatabase);
}
pEnt->close();
}