Try to open a file through python

Hi Freek,

Try this:

import rhinoscriptsyntax as rs


path = '"D:\\TEMP\\test.stl"'

rs.DocumentModified(False)
rs.Command('_-Open {} _Enter'.format(path))

Notice the double back slashes to not be caught by pythons special characters in strings

HTH
Groeten
-Willem

1 Like