1393x
003485
2023-12-18

Script Manager

The Script Manager helps you organize your script folders and script files. You can open the Script Manager by clicking the corresponding entry on the 'View' menu or the Script Manager button in the toolbar.

The 'Dlubal scripts' category contains some examples of script files created during installation. In the 'includes' folder, you find also a library of functions which you can access in your script file by the 'include()' command.

Create a new folder

Right-click the category where you want to manage the new folder. Then, select 'New Folder' on the shortcut menu.

Next, you can specify the name of the folder in the 'New Script Folder' dialog box.

Rename a folder

To change the name of a folder, right-click the corresponding entry. Then, select 'Rename' on the shortcut menu.

Next, you can adjust the name in the 'Rename Folder' dialog box.

Delete a folder

Right-click the folder you want to delete. Then, select 'Delete' on the shortcut menu (see image Renaming Folder).

Create a new script

Right-click the folder where you want to save the script. Then, select 'New Script' on the shortcut menu.

Next, you can specify the name of the script in the 'New Script' dialog box.

Edit a script

You can use any text editor for writing and editing scripts. There are various free text editors where code can be highlighted in color.

Right-click the script to be edited. Then, select 'Edit' on the shortcut menu.

Important

For the script to be opened in the text editor, this editor must be set as the default app for files of the .js type in Windows.

Create an input window

You can create an input window for entering the parameters. Select the 'Properties' on the shortcut menu of the script (see image Editing Script). If an input window has already been created, this window opens.

The input mask is generated as an XML file. It is stored in the same directory and has the same name as the script file. The structure of such an XML file is shown in the XML Script of Input Mask image. Specify the variable name as the argument-name, the standard value as the default-value and the designation as the label-name that is displayed in the input mask. The Input Mask "Script Wizard" image shows the input window generated from the XML file.

Info

For the input mask to be opened in the text editor, this editor must be set in Windows as the default app for XML files.

Run a script

To run a script, double-click the entry or select the 'Run' command in the shortcut menu of the script (see image Editing Script). If there is an error, a corresponding message appears.

Tip

For Debugging we recommend checking the output in the console.

Rename a script

To change the name of a script, right-click the corresponding entry. Then, select 'Rename' on the shortcut menu.

Next, you can adjust the name in the 'Rename Script' dialog box.

Delete a script

Right-click the script you want to delete. Then, select 'Delete' on the shortcut menu (see image Renaming Script).

Parent Chapter