BIM World
A Professional BIM Learning Platform


A Step-by-Step Guide to Programming Window Scaling Views in Revit

Starting with Revit 2013, the UIView class was introduced to manage view controls and retrieve view-related information.

UIView.GetWindowRectangle returns the drawing area’s extent, with coordinates specified in screen coordinates.

UIView.GetZoomCorner() provides the drawing area’s extent using coordinates in the model’s coordinate system.

By comparing these two sets of data, you can calculate the relationship between model coordinates and screen coordinates.

To address the task of implementing a window zoom view, the following function can be used:


public void ZoomAndCenterRectangle(
XYZ viewCorner1,
XYZ viewCorner2
)

Using UIDocument.GetOpenUIViews, you can retrieve the UIView objects for all views currently open in the model file.

Note that views which are not open do not have corresponding UIView objects.

xuebim
Follow the latest BIM developments in the architecture industry, explore innovative building technologies, and discover cutting-edge industry insights.
← Scan with WeChat
Like(0) 打赏
BIM WORLD » A Step-by-Step Guide to Programming Window Scaling Views in Revit

Comment Get first!

Must log in before commenting!

 

BIM World, A Professional BIM Learning Platform

Stay updated on the latest architecture trends and share new building technologies.

Contact UsAbout Us

觉得文章有用就打赏一下小编吧

非常感谢你的打赏,我们将继续提供更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫

微信扫一扫

Account Login

By signing in, you agree toUser Agreement

Sign Up