Hi @Tom_P , below is a python example which flashes a selected surface of a brep:
import rhinoscriptsyntax as rs
obj_ref = rs.GetObject(filter=8, preselect=False, subobjects=True)
index = obj_ref.Surface().ComponentIndex()
obj = obj_ref.Object()
for x in xrange(4):
I remember asking a similar question in the past. Using this to “select a subobject” eg:
obj.SelectSubObject(index, True, True)
can be used, but the selection does only remain while the script is running and does not stay, so it cannot be used to make eg. a transformation with a pre-selected subobject after the script finished.
Dear Clement, I got lucky, and managed to solve as below. It was the SelectSubObject method for ObjRef objects, but from the API it looks like there might be a lot of ways to do it. I’m not sure whether mine was the best or quickest.