- UID
- 4968
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-5-12
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
在填充中我采用IDS形式:appendLoop(Adesk::Int32 loopType,const AcDbObjectIdArray& dbObjIds),可我删除边界对象后,不成功,但我必须要删除,怎么办?请求高手指点!!!代码如下:
AcDbBlockTable *pBlockTable;
acdbHostApplicationServices()->workingDatabase()->getSymbolTable(pBlockTable,AcDb::kForRead);
AcDbBlockTableRecord *pBlockTableRecord;
pBlockTable->getAt(ACDB_MODEL_SPACE,pBlockTableRecord,AcDb::kForWrite);
pBlockTable->close();
AcDbObjectIdArray objIds;
AcDbHatch* pHatch = new AcDbHatch();
AcGeVector3d normal(0.0, 0.0, 1.0);
pHatch->setNormal(normal);
pHatch->setElevation(0.0);
pHatch->setAssociative(Adesk::kFalse);
pHatch->setPattern(AcDbHatch::kPreDefined, "SOLID");
pHatch->setHatchStyle(AcDbHatch::kNormal);
AcGePoint3dArray points;
AcGePoint3d start(0,0,0);
AcGePoint3d end(0,2,0);
points.append(start);
points.append(end);
end.set(2,2,0);
points.append(end);
AcDbSpline *newspline=new AcDbSpline(points);
AcDbObjectId newsplineID;
pBlockTableRecord->appendAcDbEntity(newsplineID,newspline);
objIds.append(newsplineID);
//newspline->erase();//加上此句不成功
newspline->close();
start.set(2,2,0);
end.set(0,0,0);
AcDbLine *line3=new AcDbLine(start,end);
AcDbObjectId line3ID;
pBlockTableRecord->appendAcDbEntity(line3ID,line3);
objIds.append(line3ID);
//line3->erase();//加上此句不成功
line3->close();
pHatch->appendLoop(AcDbHatch::kExternal, objIds);
pHatch->evaluateHatch();
pBlockTableRecord->appendAcDbEntity(pHatch);
pBlockTableRecord->close();
pHatch->close(); |
|