I want to select bodies by centroid via scripting in DesignModeler
centroid = [0.25, 1.5, 4.5] tolerance = 0.001 bodies_to_select = [] for body in ExtAPI.DataModel.GeoData.Bodies: if abs(body.Centroid[0] - centroid[0]) < tolerance: if abs(body.Centroid[1] - centroid[1]) < tolerance: if abs(body.Centroid[2] - centroid[2]) < tolerance: bodies_to_select.append(body) ExtAPI.SelectionManager.ClearSelection() ExtAPI.SelectionManager.AddSelection(bodies_to_select)