Click or drag to resize

UtilityCreateVariable Method

Creates the 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
SimpleVariable CreateVariable(
	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

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

JavaScript
// How to use CreateVariable
var xyzFormat = Utility.CreateFormat({decimals: 3, forceDecimal: true});
var xOutput = Utility.CreateVariable({prefix: "X"}, xyzFormat);
xOutput.Format(4.5); // returns "X4.5"

See Also