请问:用下面的代码是不是就把直线pline存到数据库pCurDb中了?是不是可以把大量的图形放到这里,想用的时候把他们调出来就可以?
如果想把这条直线重新读出来,对其进行旋转并放在指定的位置上,应该怎么做呀?
可以给一些源代码吗?俺是菜鸟了......谢谢先!
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AcGePoint3d startp(40.0,20.0,0.0); AcGePoint3d endp(200.0,500.0,0.0); AcDbLine *pLine=new AcDbLine (startp,endp); AcDbDatabase *pCurDb; AcDbBlockTable *pBlockTable; AcDbBlockTableRecord *pBlockTableRecord; AcDbObjectId lineID,dddd; pCurDb = acdbHostApplicationServices()->workingDatabase(); pCurDb->getBlockTable(pBlockTable,AcDb::kForRead); pBlockTable->getAt(ACDB_MODEL_SPACE,pBlockTableRecord,AcDb::kForWrite); pBlockTableRecord->appendAcDbEntity(lineID,pLine); pBlockTableRecord->close(); pBlockTable->close(); pLine->close();
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |