--- title: "Script" slug: "cyclone-3dr-script" updated: 2026-09-18T07:28:00Z published: 2026-09-18T07:30:18Z canonical: "rcdocs.leica-geosystems.com/cyclone-3dr-script" --- > ## Documentation Index > Fetch the complete documentation index at: https://rcdocs.leica-geosystems.com/llms.txt > Use this file to discover all available pages before exploring further. # Script ## Documentation of Javascript API > [!NOTE] > The documentation of script functions and tutorials are accessible [**here**](https://cyclone3dr.leica-geosystems.com/help/2026.1/Script/index.html)**.** Additional examples are given on [Cyclone 3DR GitHub repository (library of advanced script samples)](https://github.com/Cyclone3DR/Scripts). ## Usages The Script Plugin can be used to execute Javascript code either from the command line or the software's main Graphical User Interface. ### From the application's main window From the command [Run Script.](/v1/docs/cyclone-3dr-runc) ### From the command line When using the Script Plugin from the command line, you can specify several command line arguments as listed below: | Argument | Description | Syntax | | --- | --- | --- | | --script | Open script dialog box at startup and load a script from the given file path. | `--script="D:/script.js"` | | --scriptOutput | Writes the console output into a given file. | `--scriptOutput="D:/output.log"` | | --silent | Silent Mode. Disables the Graphical User Interface (no windows). | `--silent` | | --scriptParam | You can specify additional scripting code, which will be executed just before the specified input script (if any). It's useful to give argument to the script from the command line. As example, you can give the .3dr filename inside a variable named *fileToLoad*, and then, use it inside the .js file to open that file. **Sample js file which used a variable define with --scriptParam** JavaScript ```plaintext f(typeof fileToLoad === "undefined") throw new Error("variable 'fileToLoad' must be define using --scriptParam"); var res = OpenDoc(fileToLoad); ... ``` | `--scriptParam="var fileToLoad='d:/Project/3drfile.3dr';"` | | --scriptAutorun | Automatically runs the script once the application has been initialized. This argument is not useful if `--silent` is defined. | `--scriptAutorun` | > [!TIP] > **Example** > > Here is an example for executing from the command line: > > ```plaintext > 3DR.exe --script="D:/Tuto/SmoothPoly.js" --scriptOutput="D:/Output.log" --silent --scriptParam="var deviation=0.12; print('Use deviation control: ' + deviation);" > ``` > > This command line: > > - Starts the application in silent mode, no window, only an icon inside the taskbar. > - Executes the script **SmoothPoly.js** > - Writes the console output into the file "D:/output.log" > - Prints `"Use deviation control: 0.12"`