VisualizationOptions

Namespace: Digi21.DigiNG
Assembly: Digi21.DigiNG.Plugin

Drawing window display options: background color, cursor size, filling, shading, deleted entities, patterns, drawing scale and overlap.

public sealed class VisualizationOptions

The class has no public constructors. Obtain the object through the static DigiNG.VisualizationOptions property, which returns null if no drawing window is open. The object is bound to the drawing window active when it is obtained: when that window closes, all properties throw ObjectDisposedException.

Properties with "Application" scope read and write Digi3D.AI variables shared by all drawing windows. Properties with "Window" scope belong to the drawing window.

Properties

Property Scope Description
Color BackgroundColor Window Drawing window's background color. The get accessor returns an opaque color; the set accessor uses the red, green and blue components and ignores the alpha channel.
int CursorSize Window Cursor size, as assigned by CURSOR.
bool ShowFillInPolygons Window Filling of closed entities, enabled by FILL IN.
bool EnableShadows Window Drawing of shading. Assigning this property makes Digi3D.AI regenerate the drawing window.
bool ShowDeletedEntities Window Display of entities deleted since the last file compression, enabled by DELETED.
bool ShowPattern Window Display of line patterns, enabled by PATTERN.
double DrawingScale Application SCALE_DRAWING variable: scale at which patterns are displayed on screen. Returns 1000 if the variable is undefined.
bool ShowPatternInPhotogrammetricWindow Application SPATTERN variable: display of line patterns in the photogrammetric window. Returns false if the variable is undefined.
double Overlap Application OVERLAP variable: overlap percentage used by window panning commands. Returns 10 if the variable is undefined.

Assigning ShowFillInPolygons or ShowPattern does not regenerate the drawing window: the change appears on the next regeneration, for example after calling DigiNG.RenderScene().

Example

This command enables or disables closed entity filling and regenerates the drawing window:

using Digi21.DigiNG;
using Digi21.DigiNG.Plugin.Command;

namespace Ejemplos;

[Command(Name = "ALTERNA_RELLENO")]
public class AlternaRelleno : Command
{
    public AlternaRelleno()
    {
        Initialize += (sender, e) =>
        {
            var opciones = DigiNG.VisualizationOptions;
            opciones.ShowFillInPolygons = !opciones.ShowFillInPolygons;

            DigiNG.RenderScene();
            Dispose();
        };
    }
}