I’m trying to import multiple STEP files using Python for rhino and started out slowly with this script trying to input file names. However, I get nothing in return from
rs.OpenFileNames. Nor can I select multiple files in that dialog-box. I’m on Windows 10 64 bit using Rhino 6.1
Am I doing something weird?
#import rhinoscript.userinterface #import rhinoscript.geometry import Rhino import rhinoscriptsyntax as rs import scriptcontext as sc __commandname__ = "ImportSTEPs" # RunCommand is the called when the user enters the command name in Rhino. # The command name is defined by the filname minus "_cmd.py" def RunCommand( is_interactive ): # Ask for STEP file input filenames = rs.OpenFileNames("Open") print filenames # you can optionally return a value from this function # to signify command result. Return values that make # sense are # 0 == success # 1 == cancel # If this function does not return a value, success is assumed return 0 if( __name__ == '__main__' ): RunCommand(True)
This is my output: