Check Command -> to a file

Hello all,

I’m trying to script the -Check command in a python script. I want the output to be written in a temporary text file. I got it to work, then after, it suddenly stopped to work. Here is the code:

import rhinoscriptsyntax as rs
filename = tempfile.mktemp(suffix=".txt")
cmd = “-Check selid " + str(mesh)+ " File " + filename + " _Enter”
commandOK = rs.Command(cmd, True)

The output is: “Unknown command: File”
Then the command prompt ask for “Text destination (HistoryWIndow File Clipboard Dialog)”

Is there something wrong in my cmd? If not, Can I do something to help Rhino understand it?

Thanks for your help!

Hello - this seems to work OK

import rhinoscriptsyntax as rs
import tempfile


mesh = rs.GetObject()
filename = tempfile.mktemp(suffix='.txt')
print filename
cmd = '-Check selid ' + str(mesh) + ' Enter File ' + filename + ' _Enter'
commandOK = rs.Command(cmd, True)

-Pascal

It works ok on my side also. Thank you very much!

Alexandre