-o, -O, --OpenFilePath Instruct Dynamo to open a command file and run the commands it contains at
this path, this option is only supported when run from DynamoSandbox
-c, -C, --CommandFilePath Instruct Dynamo to open a command file and run the commands it contains at
this path, this option is only supported when run from DynamoSandbox
-v, -V, --Verbose Instruct Dynamo to output all evaluations it performs to an XML file at this path
-g, -G, --Geometry Instruct Dynamo to output geometry from all evaluations to a JSON file at this path
-h, -H, --help Get some help
-i, -I, --Import Instruct Dynamo to import an assembly as a node library. This argument should be a
file path to a single.dll - if you wish to import multiple dlls - list the dlls
separated by a space: -i 'assembly1.dll' 'assembly2.dll'
--GeometryPath Relative or absolute path to a directory containing ASM. When supplied, instead of
searching the hard disk for ASM, it will be loaded directly from this path
-k, -K, --KeepAlive Keepalive mode, leave the Dynamo process running until a loaded extension shuts it
down
--HostName Identify Dynamo variation associated with the host
-s, -S, --SessionId Identify Dynamo host analytics session id
-p, -P, --ParentId Identify Dynamo host analytics parent id
-x, -X, --ConvertFile When used in combination with the 'O' flag, opens a .dyn file from the specified
path and converts it to .json. The file will have the .json extension and be
located in the same directory as the original file
-n, -N, --NoConsole Don't rely on the console window to interact with CLI in Keepalive mode
-u, -U --UserData Specify user data folder to be used by PathResolver with CLI
--CommonData Specify common data folder to be used by PathResolver with CLI
--DisableAnalytics Disables analytics in Dynamo for the process lifetime
--CERLocation Specify the crash error report tool located on the disk
--ServiceMode Specify the service mode startup
原因
您可能出于各种原因而要从命令行控制 Dynamo,这些原因可能包括:
自动执行多个 Dynamo 运行
测试 Dynamo 图形(使用 DynamoSandbox 时,另请查看 -c)
按特定顺序运行 Dynamo 图形序列
编写运行多个命令行执行的批处理文件
编写另一个程序来控制和自动执行 Dynamo 图形的运行,并利用这些计算结果执行一些很酷的操作
内容
命令行界面 (DynamoCLI) 是对 DynamoSandbox 的补充。它是一个 DOS/终端命令行实用程序,旨在为运行 Dynamo 提供命令行参数的便利。在第一次实现中,它不是独立的运行,它必须从 Dynamo 二进制文件所在的文件夹中运行,因为它依赖于与沙盒相同的核心 DLL。它不能与其他内部版本的 Dynamo 互操作。
有四种方法可以运行 CLI:从 Dos 提示符、从 Dos 批处理文件,以及作为 Windows 桌面快捷方式(其路径已修改为包含指定的命令行标志)。Dos 文件规范可以是完全限定的或相对的,并且还支持映射驱动器和 URL 语法。也可以使用 Mono 构建它,并从终端在 Linux 或 Mac 上运行。
该实用程序支持 Dynamo 软件包,但不能加载自定义节点 (dyf),只能加载独立图表 (dyn)。
在初步测试中,CLI 实用程序支持 Windows 的本地化版本,并且您可以使用大写 ASCII 字符指定 filespec 参数。
可以通过 DynamoCLI.exe 应用程序访问 CLI。此应用程序允许用户或其他应用程序通过使用命令字符串调用 DynamoCLI.exe 与 Dynamo 评估模型进行交互。这可能如下所示: