Skip to main content

Type Alias: MarkOptionByCodeForInstances

MarkOptionByCodeForInstances = (blockCode, optionCode, instanceIds) => Promise<void>

Selects an option by its authored block and option codes for the specified modular items. Use when different designs have different block or option IDs. Missing matches and empty ID lists have no effect. Rules still apply. A change makes one undo step and emits one mimeeq-modular-select-option-multiple event with the matched IDs and the first match’s option details.

Parameters​

blockCode​

string

optionCode​

string

instanceIds​

string[]

Returns​

Promise<void>

Example​

const { actions, observers } = window.mimeeqApp;
const instanceIds = Object.keys(observers.modular.sceneItems.getValue() ?? {});
await actions.markOptionByCodeForInstances('Fabric', 'blue', instanceIds);

Throws​

If spatial adjustment rolls back the selection.