对实体的克隆

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();
}

posted @ 2015-11-18 11:15  xzh1993  阅读(248)  评论(0编辑  收藏  举报