How to change collapsed/expanded programmatically?

I want to change collapsed/expanded by clicking on element in viewer and modeler.

Is there a way to do it programmatically?

Hey,

you can use:

modeling.toggleCollapse(myAwesomeShape);

Is there any update about this subject and how to implement it toggleCollapse??