Close

Relief for ODA Team in Ukraine

Learn more
ODA BimRv SDK
Work with Views

DBViews are images that represent 3D objects and their 2D projections. They can be graphical — perspective (three-dimensional) or orthographic (two-dimensional projections on a plane) — or textual (e.g., schedules). Each ODA BimRv SDK document has at least one view.

Each DBView can have a cropped region within it where drawing is performed. This data is contained inside the DBViewer associated with the view.

Each view has a type. View types are stored in OdBm::ViewType::Enum. For example, the following are common types:

  • Plan Views — Two-dimensional views, which provide a traditional method for viewing a model. They can contain floor plans, reflected ceiling plans, and structural plans.
  • Section Views — Views that cut through the model. They can be drawn in other views, such as plan, section and detail views.
  • 3D Views — Three-dimensional views, which display objects in three dimensions and can include a background, camera position, etc.
  • Legend Views — Views that are used to store a list of building components and annotations used in a project.

Each DBDrawing has a set of viewports, and each viewport is associated with a DBView. The OdBmDBView class contains methods for working with properties of a view. For example, to get the active DBView:


// Get the DBView
OdBmDBDrawingPtr pCurrDrawing = pDb->getActiveDBDrawingId().safeOpenObject();
OdBmViewportPtr pViewport = pCurrDrawing->getBaseViewportId().safeOpenObject();
OdBmDBViewPtr pDBView = pViewport->getDbViewId().safeOpenObject();
    

Each DBView has rules that determine which elements should be drawn based on an element's category, type, property values, etc. For example, text should be drawn over all other elements and it must not change its position during view rotation. This means that the client application calls the drawing of the view, and then the view starts the drawing of elements.

To see an example of working with views, see the Examples/TB_DevGuideCommands/BmViewCmd sample command inside your ODA BimRv SDK installation folder.

Also you can see how to change view parameters inside the OdaBimApp sample application.

For more details, see the following topics:

See Also

Work with Elements

Copyright © 2002 – 2022. Open Design Alliance. All rights reserved.