[求助][ARX]请问一下关于屏幕刷新?
<P>readfromfile()</P><P>{</P>
<P>AcDbDatabase *pDb=new AcDbDatabase();<BR> Acad::ErrorStatus es=pDb->readDwgFile ("e:\\3.dwg");<BR> if(es!=Acad::eOk)<BR> {<BR> acutPrintf("Fail load dwg file.code:1");<BR> return;<BR> }<BR> AcDbBlockTable *pBlockTable;<BR> es=pDb->getBlockTable (pBlockTable,AcDb::kForWrite );<BR> if(es!=Acad::eOk)<BR> {<BR> acutPrintf("Fail load AcDbBlockTable.code:2");<BR> return;<BR> }<BR> AcDbBlockTableRecord *pBlockTableRecord;<BR> <BR> AcDbObjectId Id;<BR> es=pBlockTable->getAt ("10",pBlockTableRecord,AcDb::kForRead );<BR> if(es!=Acad::eOk)<BR> {<BR> acutPrintf("Fail found special block!.code:3");<BR> return;<BR> }<BR> else<BR> {<BR> acutPrintf("Sucessfully find the block!\n");<BR> AcDbBlockTableRecordIterator* pBTRIterator;<BR> es=pBlockTableRecord->newIterator (pBTRIterator);<BR> if(es!=Acad::eOk )<BR> {<BR> acutPrintf("Fail to construct BlockTableRecord Iterator.code:4");<BR> return;<BR> }<BR> else<BR> {<BR> int No=0;<BR> for(pBTRIterator->start ();!pBTRIterator->done ();pBTRIterator->step ())<BR> {<BR> AcDbEntity *pEnt;<BR> int ReadOrWrite=1;<BR> es=pBTRIterator->getEntity(pEnt,AcDb::kForWrite ); <BR> if(es!=Acad::eOk)<BR> {<BR> acutPrintf("Fail to find the Entity in No:%i,.code:5",No);<BR> return;<BR> }<BR> else<BR> {<BR> if(ReadOrWrite==1)<BR> {<BR> acutPrintf("And it is opened for write!\n");<BR> // 如果当前实体是以AcDb::kForWrite方式打开的,则要这样做 <BR> pEnt->downgradeOpen();<BR> pEnt->draw(); <BR> }<BR> No++;<BR> }//if<BR> }//for<BR> acutPrintf("The Record contain %i blocks!",No);<BR> // 刷新显示屏幕 <BR> actrTransactionManager->flushGraphics(); <BR> acedUpdateDisplay(); </P>
<P> }</P>
<P> }<BR> <BR> pBlockTable->close ();<BR> pBlockTableRecord->close ();<BR> delete pDb;<BR> return;<BR>}</P>
<P>请问我的这段代码为什么刷新不了显示屏啊?</P>
<P>谢谢!</P> 8年了,都没人能解释下吗?8年后的今天,又有新人同问为什么没有效果??
// 刷新显示屏幕
actrTransactionManager->flushGraphics();
acedUpdateDisplay();
页:
[1]