02-02 控制AutoCAD环境(二) 控制图形窗口(5)更新文档窗口的几何信息

02-02 控制AutoCAD环境(二) 控制图形窗口(5)更新文档窗口的几何信息,第1张

概述  5、Update the Geometry in the Document Window更新文档窗口几何信息 Many of the actions you perform through the AutoCAD .NET API modify what is displayed in the drawing area. Not all of these actions immediatel 5、Update the Geometry in the document Window更新文档窗口的几何信息

Many of the actions you perform through the autoCAD .NET API modify what is displayed in the drawing area. Not all of these actions immediately update the display of the drawing. This is designed so you can make several changes to the drawing without waiting for the display to be updated after every single action. Instead,you can bundle your actions together and make a single call to update the display when you have finished.

通过autoCAD .NET API执行的许多动作都会修改绘图区域显示的内容,但不是所有的动作都立即更新图形显示。有这样的设计,我们就可以对图形进行多次(处)修改而不必等待每次(处)修改完都更新显示,相反我们可以将全部修改动作打包在一起并在所有修改动作都完成后只执行一次更新显示的 *** 作。

The methods that will update the display are UpdateScreen (Application and Editor objects) and Regen (Editor object).

更新显示的方法有UpdateScreen(Application对象和Editor对象的)和Regen(Editor对象的)。

The UpdateScreen method redraws the application or document windows. The Regen method regenerates the graphical objects in the drawing window,and recomputes the screen coordinates and vIEw resolution for all objects. It also re-indexes the drawing database for optimum display and object selection performance.

UpdateScreen方法重画应用程序窗口或文档窗口,Regen方法重新生成绘图窗口中的图形对象并重新计算所有对象的屏幕坐标和视图变换,同时还为优化显示和对象选择性能重新索引图形数据库。

VB.NET

'' Redraw the drawing

Application.UpdateScreen()

Application.documentManager.MdiActivedocument.Editor.UpdateScreen()

'' Regenerate the drawing重新生成图形

Application.documentManager.MdiActivedocument.Editor.Regen()

C#

// Redraw the drawing

Application.UpdateScreen();

Application.documentManager.MdiActivedocument.Editor.UpdateScreen();

// Regenerate the drawing重新生成图形

Application.documentManager.MdiActivedocument.Editor.Regen();

VBA/ActiveX Code Reference

'' Redraw the drawing重画图形

ThisDrawing.Application.Update

'' Regenerate the drawing重新生成图形

ThisDrawing.Regen

总结

以上是内存溢出为你收集整理的02-02 控制AutoCAD环境(二) 控制图形窗口(5)更新文档窗口的几何信息全部内容,希望文章能够帮你解决02-02 控制AutoCAD环境(二) 控制图形窗口(5)更新文档窗口的几何信息所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1292526.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-10
下一篇 2022-06-10

发表评论

登录后才能评论

评论列表(0条)

保存