Open and run Grasshopper from a batch file 用批处理命令自动打开指定的3dm文件和GH文件

来源:互联网 发布:ai高版本软件 编辑:程序博客网 时间:2024/06/06 17:37

用批处理命令自动打开指定的Rhinoceros 文件和grasshopper文件。只需要根据本地地址修改以下代码中的PATH_EXE、PATH_DM、PATH_GH即可。

@ECHO OFFtitle This is a bat file to open Rhinoceros and Grasshopperset "PATH_EXE=C:\Program Files\Rhinoceros 5 (64-bit)\System\rhino.exe"set "PATH_DM=C:\Users\CHANT\Desktop\test.3dm"set "PATH_GH=C:\Users\CHANT\Desktop\Ex.gh"echo open %PATH_DM%echo open %PATH_GH%"%PATH_EXE%" /nosplash /runscript="-grasshopper editor load document open %PATH_GH% _enter" "%PATH_DM%"

后面的内容节选自本身参考的文章
How to automatically open Rhino and run a Grasshopper file using a batch file?A batch file is a file that allows Windows to run a list of commands automatically. They are simple text files with file extension .bat that you can easily write yourself. This post is a good tutorial onhow to make a batch file.

Copy this into a text document, and change the fields to your own file locations. Save the file, and change the extension from .txt to .bat.

@ECHO OFFcd **PATH TO DIRECTORY CONTAINING GH FILE**"**PATH TO RHINO.EXE**" /nosplash /runscript="-grasshopper editor load document open **GRASSHOPPER FILE NAME** _enter" "**PATH TO ASSOCIATED RHINO FILE**"

For example, I have a Rhino and a GH file on my desktop, respectively called random.gh and random2.3dm.

@ECHO OFFcd C:\Users\jrams\Desktop"C:\Program Files\Rhinoceros 5 (64-bit)\System\rhino.exe" /nosplash /runscript="-grasshopper editor load document open C:\Users\jrams\Desktop\random.gh _enter" "C:\Users\jrams\Desktop\random2.3dm"
阅读全文
0 0
原创粉丝点击