你粘贴的啊 !我在这里写的,没有运行,应该没有问题。 void xb() { AcDbDatabase *pDb=new AcDbDatabase(); AcDbBlockTable *pBlkTb; pDb->getSymbolTable(pBlkTb,AcDb::kForRead); AcDbBlockTableRecord *pBlkTbRcd; pBlkTb->getAt(ACDB_MODEL_SPACE,pBlkTbRcd,AcDb::kForWrite); pBlkTb->close(); AcDbCircle *pCircl=new AcDbCircle(AcGePoint3d(1,1,1),AcGeVector3d(0,0,1),1.0); AcDbCircle *pCirc2=new AcDbCircle(AcGePoint3d(4,4,4),AcGeVector3d(0,0,1),2.0); pBlkTbRcd->appendAcDbEntity(pCircl); pBlkTbRcd->appendAcDbEntity(pCirc2); pCircl->close(); pCirc2->close(); pBlkTbRcd->close(); pDb->saveAs("tt.dwg"); delete pDb; } |