Running Python script in Rhino 7.
I can’t get import to accept blanks as part of the file name. No matter what I do it uses first blank as
an enter and chops the the name off after the “~1”.
I’ve seen other examples where chr(34) was used but it was for vb.
print “xxxxxxxx”
fname = “~1 10 3.35 x 4.55.stl”
command = “-_import " + “’” + rs.WorkingFolder() + “\” + “stones” + ‘\’ + fname + “’” + " -_enter”
print "My current directory is : " + command
rs.Command(command)
Hi
Thanks for your help. I didn’t see anything that would work. I think the issue is how Rhino treats a blank in
the command line and how to get Rhino to ignore the blank in the filename. In the vb sample I found
using chr(34) around the file name forced Rhino to look past the blanks but that option doesn’t look like it works using python.
That’s fine too I guess. I could imagine someone not liking mixing these, but if it works for you… I suppose representing strings in a mixed way ( a = "one", b = 'two') in code is what one would trip over. But who knows.