-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 演算模型互動。看起來可能會像下面這樣: