2

subprocess.call()現在、Rhino を開き、外部の Python スクリプトを使用して Rhino コマンド ラインを実行しています。

rhinoPath = "C:\\Program Files (x86)\\Rhinoceros 5\\System\\Rhino4.exe"
rhinoCommandFilePath = "Z:\\Arkangus\\2019\\RhinoCommand.txt"
scriptCall = "_-ReadCommandFile {0}".format(rhinoCommandFilePath)
callScript = '"{0}" /nosplash /runscript="{1}" /runscript="_-Exit"'.format(rhinoPath, scriptCall)
subprocess.call(callScript)

ただし、スクリプトを実行するたびに Rhino を開き、その後は閉じる必要があります。

Rhino が既に開いているかどうかを確認し、その場合に RhinoCommand ファイルを直接 Rhino に実行する方法はありますか?

Rhino と Python の間のパイプを探しているわけではありません。

ありがとうございました!

4

1 に答える 1