使用命令行选项启动 PreForm
使用命令行选项启动 PreForm
使用附加命令行参数打开 PreForm 应用程序,以便在打开后自动执行各种操作。部分功能包括加载模型、预选材料、设置打印以及上传到打印机。
如何使用命令行选项启动 PreForm
通过打开应用程序或从操作系统的终端启动 PreForm 时,可以传递命令行选项。在 Windows 上,应用程序名称为 PreForm.exe,而在 MacOS 上,可执行文件位于应用程序的 PreForm.app/Contents/MacOS/PreForm 目录中。
使用命令提示符应用程序在 Windows 上自动导入文件的示例:
cd path/to/your/preform
PreForm.exe myfile.stl --ignoreRepair
命令行参数
PreForm 启动时自动加载模型 模型或 .FORM 文件列表可以作为命令行输入传递,在 PreForm 启动后自动加载。
./PreForm model1.stl model2.stl
模型导入行为
覆盖命令行输入中指定的模型列表的默认模型导入行为。
| Command line option | Description |
|---|---|
| --silentRepair | Automatically repair the model’s meshes if needed without asking the user for input. |
| --ignoreRepair | Skip repairing the model’s meshes without asking the user for input. |
| --modelUnits <unit> | Specify the unit system of the .stl or .obj file. Valid values are "mm" and "in". Default is "mm". |
自动将加载的模型上传到打印机中
| Command line option | Description |
|---|---|
| --printer <printer> | Select a printer as the upload target. Printer name can either be its local IP address for local network printing or its serial name for remote printing if used with the --useRemote option. |
| --upload | Automatically upload the loaded models to a printer when PreForm starts. |
| --jobName <jobName> | Job name to use when sending a job to a printer. |
| --username <username> | Username to use when logging in to your Dashboard account. |
| --password <password> | Password to use when logging in to your Dashboard account. |
| --useRemote | Upload the print using remote printing. Must be used with the username and password options. |
| --close | Upload the print using remote printing. Must be used with the username and password options. If used with the --upload option, automatically close the PreForm application after the upload completes. |
| --autoSetup | Automatically set up the imported models using PreForm's One Click Print automatic setup. |
选择打印设置
默认情况下,PreForm 使用所选打印机或输入的 .FORM 文件中的材料。以下选项可用于预选不同的材料。打印设置输入的组合必须在 PreForm 中可用。请参阅 Formlabs 本地 API 的材料列表端点,获取受支持的设置和标识符列表。
| Command line option | Description |
|---|---|
| --material <material> | Material code to use for the job. Example: FLGPGR04 |
| --thickness_um <thickness> | Layer Thickness to use for the job in microns. Example: 100 |
| --printSetting <printSetting> | Print setting to use for the job. Must be used with --material and --thickness_um options. Example: Beta |
其他选项
| Command line option | Description |
|---|---|
| --lang <lang> | Set the UI Language -- en, de, es, fr, it, ja, zh, zh-Hans, zh-Hant |
| -v, --version | Displays version information |