明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3872|回复: 1

[求助][ARX]请问一下关于屏幕刷新?

[复制链接]
发表于 2006-5-10 17:42:00 | 显示全部楼层 |阅读模式

readfromfile()

{

AcDbDatabase *pDb=new AcDbDatabase();
  Acad::ErrorStatus es=pDb->readDwgFile ("e:\\3.dwg");
  if(es!=Acad::eOk)
  {
   acutPrintf("Fail load dwg file.code:1");
   return;
  }
  AcDbBlockTable *pBlockTable;
   es=pDb->getBlockTable (pBlockTable,AcDb::kForWrite );
  if(es!=Acad::eOk)
  {
   acutPrintf("Fail load AcDbBlockTable.code:2");
   return;
  }
  AcDbBlockTableRecord *pBlockTableRecord;
  
  AcDbObjectId Id;
  es=pBlockTable->getAt ("10",pBlockTableRecord,AcDb::kForRead );
  if(es!=Acad::eOk)
  {
   acutPrintf("Fail found special block!.code:3");
   return;
  }
  else
  {
   acutPrintf("Sucessfully find the block!\n");
   AcDbBlockTableRecordIterator* pBTRIterator;
   es=pBlockTableRecord->newIterator (pBTRIterator);
   if(es!=Acad::eOk )
   {
    acutPrintf("Fail to construct BlockTableRecord Iterator.code:4");
    return;
   }
   else
   {
    int No=0;
    for(pBTRIterator->start ();!pBTRIterator->done ();pBTRIterator->step ())
    {
     AcDbEntity *pEnt;
     int ReadOrWrite=1;
     es=pBTRIterator->getEntity(pEnt,AcDb::kForWrite );
     if(es!=Acad::eOk)
     {
      acutPrintf("Fail to find the Entity in No:%i,.code:5",No);
      return;
     }
     else
     {
      if(ReadOrWrite==1)
      {
      acutPrintf("And it is opened for write!\n");
       // 如果当前实体是以AcDb::kForWrite方式打开的,则要这样做 
      pEnt->downgradeOpen();
      pEnt->draw();  
      }
      No++;
     }//if
    }//for
    acutPrintf("The Record contain %i blocks!",No);
    // 刷新显示屏幕 
    actrTransactionManager->flushGraphics(); 
    acedUpdateDisplay(); 

   }

  }
  
  pBlockTable->close ();
  pBlockTableRecord->close ();
  delete pDb;
  return;
}

请问我的这段代码为什么刷新不了显示屏啊?

谢谢!

发表于 2014-5-24 19:12:37 | 显示全部楼层
8年了,都没人能解释下吗?8年后的今天,又有新人同问为什么没有效果??
    // 刷新显示屏幕  
    actrTransactionManager->flushGraphics();  
    acedUpdateDisplay();
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-25 07:24 , Processed in 0.142033 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表