Launching PreForm with command line options
Launching PreForm with command line options
PreForm application can be launched with additional command line arguments to perform various actions automatically after opening. Some features include loading models, preselecting materials, setting up a print, and uploading it to a printer.
How to start PreForm with command line options
When starting PreForm by opening the application or from your operating system’s terminal, command line options can be passed in. On Windows the application name is PreForm.exe while on MacOS the executable is nested within the application at PreForm.app/Contents/MacOS/PreForm.
Example of automatically importing a file on Windows using the Command Prompt application:
cd path/to/your/preform
PreForm.exe myfile.stl --ignoreRepair
Command line arguments
Automatically load models when PreForm starts A list of models or .FORM files can be passed as command line inputs to automatically be loaded after PreForm launches.
./PreForm model1.stl model2.stl
Model Import Behavior
Override the default model import behavior for the list of models specified in the command line input.
| 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". |
Automatically upload the loaded models into a printer
| 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. |
Selecting Print Settings
By default, PreForm uses the material of the selected printer or inputted .FORM file. The following options can be used to preselect a different material. The combination of print setting inputs must be available in PreForm. See the Formlabs Local API’s List Materials endpoint to get the list of supported settings and identifiers.
| 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 |
Miscellaneous options
| 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 |