Nevron Open Vision Documentation
Diagram Document Object Model (DDOM)

The Diagram Document Object Model, often referred to as the DDOM, is an extensive object model that encompasses all possible objects that constitute a diagram. The DDOM has two distinct object hierarchies – one for drawing documents and one for library documents.

Drawing Documents

The following image illustrates the basic objects involved in drawing documents and their placement in DDOM hierarchy.

figure 1. Drawing Objects

Following is an overview of the main types of objects involved in making a drawing document:


NDrawingDocument – a drawing document is a NOV DOM document that contains a NDrawing element, which is accessible via its Content property. The NDrawingView widget is designed to display the content of a drawing document.


NDrawing – the drawing element contains a collection of pages. Of all pages in the drawing only one can be active at a time. The drawing contains Screen and Print visibility that define the global visibility of certain drawing elements, such as grid, rulers, guidelines, ports etc. The drawing also contains the settings that affect the drawing view tools and the editors created for the selected elements.


NPage – represents a drawing page. A drawing page is a diagram surface in the Items collection of which you can add shapes and guidelines. The page maintains the set of currently selected page items (i.e. Shapes and Guidelines). The page is responsible for displaying visual editors for the currently selected shapes. The page has Grid and Rulers children that affect the grid and rulers displayed by the drawing. The page Router is responsible for arranging the routable connectors inside the page. The page PrintLayout is responsible for arrangement of page when exported to paged medias - such as PDF and Printing.


    NGuideline – a guideline is a page item that is used for the visual alignment of shapes. There are two distinct types of guidelines – NHorizontalGuideline and NVerticalGuideline.
   

NShape – a shape is a container for geometry, text, controls, ports and other shape specific elements. A shape can be either 1D or 2D. 2D shapes behave as boxes. 1D shapes behave as lines connecting other shapes.  The begin and end points of 1D shapes can be glued to other shapes and ports.


NGeometry – the geometry object is responsible for making a graphics path for the shape. Each shape has exactly one geometry object. The geometry is a collection of geometry commands that represent either primitive plotter commands (like NMoveTo, NLineTo, NArcTo etc.) or entire figures and drawing paths (like NDrawRectangle, NDrawEllipse, NDrawPath etc.)


NTextBlock – the text block is responsible for displaying the text of a shape. Each shape has exactly one text block. The text block has many properties affecting the text font, style and layout behavior. The text block can be glued to different aspects of its owner shape.


NPort – a port is a shape connection point. Ports can be inward and/or outward and input and/or output. Ports play an essential role in shape authoring since they allow you to specify shape specific points where 1D shapes  can connect their begin or end points. The ports of a shape are contained inside the shape Ports collection.


NControl – represents a shape control points. When selected, the shape controls can be visually edited by the user. In most cases you will use expressions to bind the control point location to specific aspects of the shape geometry.

NGroup  - a group is as shape in the Shapes collection of which you can have other shapes. Groups help you manage several shapes together.

NRoutableConnector - a routable connector is a special type of 1D shape, which is designed to avoid obstacles in its path (i.e. be routed).  Automatic layouts are also designed to change the geometry of routable connectors.

Library Documents

The following image illustrates the basic objects involved in library documents and their placement in DDOM hierarchy:

figure 2. Library objects

Following is an overview of the main types of objects involved in making a library document:

NLibraryDocument – a library document is a NOV DOM document that contains a NLibrary element, which is accessible via its Content property. The NLibraryView widget is designed to display the content of a library document.

NLibrary – the library is a diagram surface in the Items collection of which you can add library items. The library maintains the set of the currently selected library items. The library is also responsible for the visual arrangement of the library items.

NLibraryItem – a library item represents a drawing clipping. Each library item can have one or multiple shapes inside its Shapes collection. The library item can be drag and dropped over a drawing page and create an instance of its shapes inside that page.

 

Send Feedback