No, this will work to select all the objects in the last “bake” operation - that is why I posted it.
So, your script might look like this:
import rhinoscriptsyntax as rs
def ExportIGESFile():
filter="IGES files|.igs||"
filename=rs.SaveFileName("Iges export",filter)
if not filename: return
#make sure nothing is selected first
rs.UnselectAllObjects()
#select your just-baked object(s) here - will get them all
rs.Command("_SelLast")
rs.Command("_-Export "+chr(34)+filename+chr(34)+" _Enter",False)
ExportIGESFile()
You do need to run the script just after the bake operation and before you have created or selected any new objects in the file.