- 积分
- 397
- 明经币
- 个
- 注册时间
- 2011-6-4
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
CMyEntity *pEnt=new CMyEntity();//自定义实体
pEnt->getFirstPoint(asPnt3d(pstart));
pEnt->getEndPoint(asPnt3d(pend));
AcDbBlockTable* pBT = NULL;
AcDbDatabase* pDB = acdbHostApplicationServices()->workingDatabase();
pDB->getSymbolTable(pBT,AcDb::kForRead);
AcDbBlockTableRecord* pBTR = NULL;
pBT->getAt(ACDB_MODEL_SPACE, pBTR, AcDb::kForWrite);
pBT->close();
AcDbObjectId Id;
pBTR->appendAcDbEntity(Id,pEnt);
pBTR->close();
pEnt->close();
程序执行到 pBTR->appendAcDbEntity(Id,pEnt); 时报错
|
|