Вам нужно пройти по дереву экземпляров , чтобы найти интересующего вас родителя. В вашем примере это будет что-то вроде этого:
const ids = viewer.getSelection();
if (ids.length > 0) {
const instanceTree = viewer.model.getData().instanceTree;
let id = ids[0];
id = instanceTree.getNodeParentId(id);
id = instanceTree.getNodeParentId(id);
id = instanceTree.getNodeParentId(id);
// Or better, traverse the parents in a while loop until you find one that matches your requirements
viewer.getProperties(id, function(props) {
console.log(props);
});
}