Skip to main content

setParamValue

@combeenation/custom-code-utils


Variable: setParamValue()

const setParamValue: (title, value, sdCtrlName?, queued) => Promise<SDUpdateQueueResult> = SdvParameter.setParamValue

Set parameter value of the model.
Changes are not sent immediatly but forwarded to a designated queue instead (see description of queued parameter).

Parameters

title

string

value

string | number | boolean | Blob

sdCtrlName?

string

If not configured, the first shapediver instance of the configurator is used

queued?

boolean = false

true: Parameter will be applied after all currently pending parameter updates are finished.
In this case the current parameter update will not be aborted, which could otherwise lead to missing or erronous parameter updates.
false: Parameter will be applied in the next JS cycle, no matter if other parameter updates are currently pending.
Parameter updates which are triggered within the same JS cycle are accumulated and applied in one update.\

Returns

Promise<SDUpdateQueueResult>