Click or drag to resize

UtilityCreateIncremental Method

Creates the incremental output object that is used to control the output of a code.

Namespace: Woodwork.Automation
Assembly: WoodworkAutomation (in WoodworkAutomation.dll) Version: 2.1.25
Syntax
IncrementalVariable CreateIncremental(
	Object formatDescriptor,
	Object shaper
)

Parameters

formatDescriptor  Object
The Format object that defines how the value is formatted.
shaper  Object
The reference Format object for creating the variable.

Return Value

IncrementalVariable
The IncrementalVariable object defined by formatDescriptor and based on the shaper.

JavaScript
// How to use CreateIncremental
var nrStr = Utility.CreateFormat({ prefix: 'N', decimals: 0 });
var nrIncVar = Utility.CreateIncremental({ first: 10, step: 2 }, nrStr);
nrIncVar.Format(); // returns the initial value of 10 
nrIncVar.Format(); // returns 12 = initial value incremented by 2

See Also