This is a question that’s possibly for @eirannejad as it’s related to my use of the Rhino 8 ScriptEditor
, though @dale might also have some insight as he has answered questions similar to this in the past.
I am trying to write a command where the user can paste a URL or file path into the command line. Here is some sample code:
import Rhino
url_input_request = Rhino.Input.Custom.GetString()
url_input_request.SetCommandPrompt('Paste a URL here.')
while True:
get_url = url_input_request.Get()
if get_url == Rhino.Input.GetResult.String:
url_path = url_input_request.StringResult()
print(url_path)
break
In Rhino 8, I am able to use Ctrl + V
to paste the URL without issues like so:
However, in Rhino 7, I just get the following:
Paste a URL here.: '_Paste
Paste a URL here.: https://energyplus-weather.s3.amazonaws.com/north_and_central_america_wmo_region_4/USA/NY/USA_NY_New.York-J.F.Kennedy.Intl.AP.744860_TMY3/USA_NY_New.York-J.F.Kennedy.Intl.AP.744860_TMY3.zip
Unknown command: https://energyplus-weather.s3.amazonaws.com/north_and_central_america_wmo_region_4/USA/NY/USA_NY_New.York-J.F.Kennedy.Intl.AP.744860_TMY3/USA_NY_New.York-J.F.Kennedy.Intl.AP.744860_TMY3.zip
Granted, I can still get things to work in either Rhino 7 or 8 by right-clicking in the command line and selecting “Paste”:
But I would really like to know: is there anythign that I could change about my code to get it to behave the same way in Rhino 7 as it does in Rhino 8? So the user would be able to use Ctrl + V
and I could hopefully avoid users getting confused about this like this case here?
Thank you, as always.