This method can round a value to a certain precision, default is 2
the value that needs to be rounded
Optional
precision: numberthe precision of the rounding operation
the rounded value as a number
This method can help you stage a file to the CHILI GraFx Environment API for upload.
The Files or Blobs to stage.
The connector ID from Environment API to stage the files for.
Optional
validationConfiguration: UploadValidationConfigurationThe validation configuration to use for the files.
Promise<FilePointer[]> referencing the staged data.
Evaluates a unit expression and returns its value as a number in the specified conversionUnit, or in the current layout measurement unit if conversionUnit is not provided.
Returns null if unitExpression is null, empty, or cannot be evaluated.
Example:
const value = await SDK.utils.unitEvaluate('10cm', MeasurementUnit.px);
// value is the numeric value in px
The unit expression to evaluate (e.g., "10px", "5mm + 2cm", null)
Optional
conversionUnit: MeasurementUnitOptional target unit for conversion. If not provided, uses the current layout measurement unit.
The evaluated result as a number, or null if the expression cannot be evaluated
The UtilsController exposes a set of useful utilities that can be used to make some repeated tasks a bit easier Methods inside this controller can be called by
window.SDK.utils.{method-name}