Click or drag to resize

UtilityCreateModal Method

Creates the modal 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
ModalVariable CreateModal(
	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

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

JavaScript
// How to use CreateModal
var gFormat = Utility.CreateFormat({prefix:"G", decimals:0, width:2, zeropad:true});
var gMotionModal = Utility.CreateModal({force: true}, gFormat);
gMotionModal.Format(0); // returns G00

See Also