Table of Contents

CadInputOptions Class

Definition

Namespace
GleamTech.DocumentUltimate
Assembly
GleamTech.DocumentUltimate.dll

Represents a set of Cad input options used for document conversion.

public class CadInputOptions : InputOptions
Inheritance
CadInputOptions

Examples

Render as black background but keep foreground colors:

//Black background but foreground colors will be kept same as in the drawing.
//Foreground colors in the drawing are corrected automatically when required 
//so that they are always visible on the set background color.
var inputOptions = new CadInputOptions
{
    RenderBackgroundColor = Color.Black
};

DocumentConverter.Convert(@"c:\SomeFolder\InputFile.dwg", inputOptions, DocumentFormat.Pdf);
'Black background but foreground colors will be kept same as in the drawing.
'Foreground colors in the drawing are corrected automatically when required 
'so that they are always visible on the set background color.
Dim inputOptions As New CadInputOptions() With {
    .RenderBackgroundColor = Color.Black
}

DocumentConverter.Convert("c:\SomeFolder\InputFile.dwg", inputOptions, DocumentFormat.Pdf)

Render as black and white:

//Black and white (all foreground colors will be fixed to White because the property is explictly set)
var inputOptions = new CadInputOptions
{
    RenderBackgroundColor = Color.Black,
    RenderForegroundColor = Color.White
};

DocumentConverter.Convert(@"c:\SomeFolder\InputFile.dwg", inputOptions, DocumentFormat.Pdf);
'Black and white (all foreground colors will be fixed to White because the property is explictly set)
Dim inputOptions As New CadInputOptions() With {
    .RenderBackgroundColor = Color.Black,
    .RenderForegroundColor = Color.White
}

DocumentConverter.Convert("c:\SomeFolder\InputFile.dwg", inputOptions, DocumentFormat.Pdf)

Render as blueprint:

//Blueprint
var inputOptions = new CadInputOptions
{
    RenderBackgroundColor = Color.FromRgb(58, 110, 180),
    RenderForegroundColor = Color.White
};

DocumentConverter.Convert(@"c:\SomeFolder\InputFile.dwg", inputOptions, DocumentFormat.Pdf);
'Blueprint
Dim inputOptions As New CadInputOptions() With {
    .RenderBackgroundColor = Color.FromRgb(58, 110, 180),
    .RenderForegroundColor = Color.White
}

DocumentConverter.Convert("c:\SomeFolder\InputFile.dwg", inputOptions, DocumentFormat.Pdf)

Constructors

CadInputOptions()

Initializes a new instance of the CadInputOptions class.

CadInputOptions(DocumentFormat)

Initializes a new instance of the CadInputOptions class with a document format.

Properties

RenderBackgroundColor

Gets or sets the background color of the drawing when it's rendered. The default is white. Default foreground color in the drawing is corrected automatically when required so that it's always visible on the set background color.

RenderForegroundColor

Gets or sets the foreground color of the drawing when it's rendered. The default is null, which means foreground colors will be kept same as in the drawing. When set, all foreground colors will be fixed to this same color. For example, you can have a black and white or a blueprint output.