Nevron Open Vision Documentation
About Drawings

Drawings are represented by the NDrawing class, an instance of which can be obtained from the Content property of the NDrawingDocument class. Drawings are the root elements of a drawing hierarchy.

Each drawing is composed from a set of pages that are contained in an NPageCollection accessible from the Pages property of the drawing. Of all pages inside the drawing only one can be active at a time. The active page is controlled by the ActivePageIndex property or the ActivePage property. By default each drawing is created with a single page that is at the same time the active page of the drawing. The following code example creates a second drawing page and makes it the active one:

Changing the Active Page
Copy Code
NDrawing drawing = drawingView.Document.Content;
NPage secondPage = new NPage();
drawing.ActivePage = secondPage;
Media Visibility

The NScreenVisibility and NPrintVisibility elements (derived from NMediaVisibility) are accessible from the ScreenVisibility and PrintVisibility properties respectively. They control the global visibility of certain diagram elements when the drawing is displayed on screen and when printed (or exported to other formats).

By default the grid, guidelines, ports and page breaks are not displayed when the drawing is printed and that is why the respective properties of the media visibility accessible by the PrintVisibility property are set to false.

It is also often required to hide the grid, guidelines, ports, rulers and page breaks of content displayed on screen. You do that by setting the respective properties of the ScreenVisibility to false. For example the following code hides the grid, rulers, guidelines and ports for all pages in the specified drawing:

Hide the Grid, Guidelines, Rulers  and Ports
Copy Code
NDrawing drawing = drawingView.Document.Content;
NScreenVisibility visibility = drawing.ScreenVisibility;
visibility.ShowGrid = false;
visibility.ShowGuidelines = false;
visibility.ShowRulers = false;
visibility.ShowPorts = false;

The NDrawingSettings element accessible from Settings property controls global settings for the drawing. These settings can be generally classified in the following categories:


Send Feedback