我是新手,望各位兄弟帮我看看,这段程序片有什么问题?谢谢了!
<p> AcDbDatabase* pOldDb = acdbHostApplicationServices()->workingDatabase();<br/> AcDbDatabase* pNewDb = new AcDbDatabase();<br/> acdbHostApplicationServices()->setWorkingDatabase(pNewDb);<br/><br/> ''''''//执行数据写入操作<br/> <br/> pNewDb->saveAs(_T("RouteTable.dwg"));<br/> acdbHostApplicationServices()->setWorkingDatabase(pOldDb);<br/> delete pNewDb;<br/></p><p>编绎是没问题的,但在加载ARX后,执行此段,报错,访问拒绝,,,</p><p>我把pNewDb->saveAs(_T("RouteTable.dwg"));注释掉后,运行没反映,但是什么文件也没生成.</p> <p>你粘贴的啊 !我在这里写的,没有运行,应该没有问题。</p><p>void xb()<br/>{<br/>AcDbDatabase *pDb=new AcDbDatabase();<br/>AcDbBlockTable *pBlkTb;<br/>pDb->getSymbolTable(pBlkTb,AcDb::kForRead);<br/>AcDbBlockTableRecord *pBlkTbRcd;<br/>pBlkTb->getAt(ACDB_MODEL_SPACE,pBlkTbRcd,AcDb::kForWrite);<br/>pBlkTb->close();<br/>AcDbCircle *pCircl=new AcDbCircle(AcGePoint3d(1,1,1),AcGeVector3d(0,0,1),1.0);<br/>AcDbCircle *pCirc2=new AcDbCircle(AcGePoint3d(4,4,4),AcGeVector3d(0,0,1),2.0);<br/>pBlkTbRcd->appendAcDbEntity(pCircl);<br/>pBlkTbRcd->appendAcDbEntity(pCirc2);<br/>pCircl->close();<br/>pCirc2->close();<br/>pBlkTbRcd->close();<br/>pDb->saveAs("tt.dwg");<br/>delete pDb;</p><p>}</p> <p>CAD&CG讨论群:58756233</p><p>ARX高手、初学者请进,对计算机图形有兴趣请进</p> 还是谢谢你.
页:
[1]