938x
003596
2023-12-05

Creating Scripting

Console

The Console is useful for entering and executing commands or checking the results. Open the console by clicking the corresponding entry in the "View" menu, or use the Console button in the toolbar.

You can enter and execute commands directly in the console. Auto-complete helps you to quickly insert functions and object properties. It also helps you to avoid input and syntax errors. For example, the image Executing Commands in Console shows how to define a node with the coordinates X = 1, Y = 1, Z = 1. Finally, use the Enter key to execute the command defined in the console.

You can also insert any object properties as command references in the console. The Info button allows you to view the required object properties in a dialog box. Then, transfer the object properties to the console by double-clicking it or by clicking OK.

Script Manager

The Script Manager allows you to 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 the script files created during the installation. In the "includes" folder, you will also find a library of functions that can be accessed in your script file by using the "include()" command.

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

In our example, the new script is called OP2 and is available in the user scripts after it has been created. To edit it, right-click it and select Edit Script.

Although we use Notepad++ in this webinar, you can edit scripts in RFEM 6 using any other editor. For example, Image 02 shows how to edit a script to create several nodes on a line. According to the command written in the script, a node is created in the X direction every 1 m, up to i, which is set to 5 in this case.

Make sure to save the script. In the list of user scripts, you can double-click the script to see the elements created in the RFEM work window.

Parent Chapter