https://in.mathworks.com/help/simulink/slref/simulink.dialog.treecontrol.getselecteditems.html
getSelectedItems - Get the values of selected items from a tree hierarchy - MATLAB
This MATLAB function fetches the information of the selected items in the tree.
get theselected items