C

Value<TValue>

A class that represents values which can be assigned to cells. It provides factory methods for values with different types and units.

Inheritance Hierarchy

Remarks

Type Parameters

TValue

Members

Show:

Properties

Methods

Static Methods

Returns a Value object that wraps an angle value.

static

Parameters

radians: number

The angle in radians.

formula?: string | VsdxFormula

An optional formula.

displayUnit?: string

The unit that will be displayed in the VSDX viewer for this cell.

Return Value

Returns a Value object that wraps a boolean value.

static

Parameters

value: boolean

The value.

formula?: string | VsdxFormula

An optional formula.

Return Value

Returns a Value object with the given date and formula.

static

Parameters

date: Date

The date.

formula?: string | VsdxFormula

. An optional formula.

Return Value

Returns a Value object representing an enum value.

static

Parameters

value: number

The enum value as number.

formula?: string | VsdxFormula

An optional formula.

Return Value

Returns the value for the given object and cell name.

If the object itself does not contain a cell with the given name, it tries to find whether this value is inherited from a master shape or style sheet. If yes, this value will be returned, otherwise a new Value with null value will be returned.

You can use this method to safely retrieve references e.g. for writing formulas with template strings.

static

Parameters

object: VsdxObject
cellName: string

Return Value

Returns a Value object that represents a font.

static

Parameters

font: string

The font string.

formula?: string | VsdxFormula

An optional formula.

Return Value

Returns a Value object with the given formula and unit. Note that VSDX viewers do not necessarily evaluate formulas and the VSDX Export evaluates them only when the VsdxExportConfiguration.evaluateFormulas is set to true.

static

Parameters

formula: string | VsdxFormula

The formula.

displayUnit?: string

The unit that will be displayed in the VSDX viewer for this cell.

Return Value

Returns a Value object that wraps a numerical value.

static

Parameters

number: number

The numerical value.

formula?: string | VsdxFormula

An optional formula.

displayUnit?: string

The unit that will be displayed in the VSDX viewer for this cell.

Return Value

Returns a Value object that references a VsdxPath. Used for the ForeignShape.clippingPath cell.

static

Parameters

path: VsdxPath

Return Value

Returns a Value object with the given point and formula.

static

Parameters

point: Point
formula?: string | VsdxFormula

Return Value

Returns a Value object that represents an rgb color.

static

Parameters

Return Value

Returns a Value object that wraps a scalar value.

static

Parameters

inches: number

The value in inches.

formula?: string | VsdxFormula

An optional formula.

displayUnit?: string

The unit that will be displayed in the VSDX viewer for this cell.

Return Value

Returns a Value object that wraps a string value.

static

Parameters

string: string

The string. Formatting characters like newlines and tab characters are allowed.

formula?: string | VsdxFormula

An optional formula.

displayUnit?: string

The unit that will be displayed in the VSDX viewer for this cell.

Return Value