767x
003501
2023-05-24

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 in 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 also find a library of functions that can be accessed in your script file using the "include()" command.

Creating New Folder

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

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

Renaming Folder

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

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

Deleting Folder

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

Creating New Script

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

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

Editing 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" in the shortcut menu.

Important

In order to open a script in the text editor, it is necessary to set this editor as the default app for files of the .js type in Windows.

Creating Input Window

You can create an input window for entering the parameters. Select the "Properties" in the shortcut menu of the script (see the 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 image XML Script of Input Mask. 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 window. The image Input Window "Script Wizard" shows the input window generated from the XML file.

Info

In order to open the input window in the text editor, it is necessary to set this editor in Windows as the default app for XML files.

Running Script

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

Tip

For debugging , we recommend checking the output in the console.

Renaming Script

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

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

Deleting Script

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

Parent Chapter