Unselect "selected" part

I’m working on a configurator, using selectable parts to select and update parameters.

  var part = {
    id: "modelParts",
    hoverable: true,
    hoverEffect: hoverEffect,
    selectable: true,
    selectionEffect: selectionEffect,
    draggable: false,

And I have a function when is triggered, creates and “engraving” and moves the camera to the target. But my problem is when the part is “selected”, because the colors of the elements are not as I expect.

Is there a way through the Shapediver API or using JS to deselect all the selectable elements?

OK! when all parts are deselected.

The issue, when the part is selected.

The API function updateSelected() does exactly what you need. You can use it to programmatically select or unselect a list of scene paths in the scene. Let me know if the specification in the link is clear.

Thanks! It was what I was looking for and it works perfect.