Click or drag to resize

UtilityCreateReference Method

Creates the reference 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
ReferenceVariable CreateReference(
	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

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

JavaScript
// How to use CreateReference
var ijkFormat = Utility.CreateFormat({decimals:3});
var iOutput = Utility.CreateReference({prefix: "I", forceDecimal}, ijkFormat);
iOutput.format(.001, 0); // returns "I0.001"
iOutput.format(.0001, 0); // returns ""

See Also