刷新显示

void refreshDisplay()

{

        actrTransactionManager->queueForGraphicsFlush();

        actrTransactionManager->flushGraphics();

        acedUpdateDisplay();

}

acedUpdateDisplay(); 仅仅是刷新屏幕,而实体不重新生成

 

更新一个实体,用AcDbEntity::recordGraphicsModified()/*R方法可以特性表中修改属性后调用,close时刷新*/和AcDbEntity::draw();

对实体用AcDbEntity::recordGraphicsModified方法,使用Adesk::kTrue参数,实体关闭后,将UPDATE。

void recordGraphicsModified(Adesk::Boolean setModified = Adesk::kTrue);

setModified        Input Boolean value to indicate if the entity's graphics should be updated on screen when the object is closed

This method sets the entity's state to indicate whether or not the entity should be updated on screen when it is closed. If the entity is set not to update, then any changes made will appear the next time the entity is regenerated. If setModified == Adesk::kFalse and the entity is currently set to update its graphics on close (which is its default state), then this function sets the entity so that it will not update on screen when it is closed and objectModified notification is sent to all entity type reactors attached to the entity. If setModified == Adesk::kFalse and the entity is already set not to update its graphics on close, then this function simply returns. If setModified == Adesk::kTrue, then the entity is set to update on screen when it is closed. 

posted on 2012-12-28 12:33  章力博  阅读(4701)  评论(0编辑  收藏  举报