setConfigurationState

Attempts to set an array with a ConfigurationState for present Variants and Materials in the model.

Returns an array with the final ConfigurationState that was set.

setConfigurationState(
		state: Array<ConfigurationState>
): Promise<ConfigurationState[]>

Parameters
Description

state

Array<ConfigurationState> An array with different states for VariantSwitcherData and MaterialSwitcherData

Usage:

await modelApi.setConfigurationState([
    {
        "variant": "Object Switcher",
        "active_object": "NUNO Stand"
    },
    {
        "object": "Adjustable Headband",
        "active_material": "White"
    }
]);

Return value:

[
    {
        "switcher": "Object Switcher",
        "object": "NUNO Stand"
    },
    {
        "object": "Adjustable Headband",
        "material": "White"
    }
]

Last updated