3 The easiest way of getting started with SCL is to use SCL console that is normally included in
\r
4 Simantics-based products. You can open the console by pressing ALT-SHIFT-q and s or
\r
5 from menu **Window/Show View/SCL Console**.
\r
7 ## Executing commands
\r
9 SCL console works by executing commands you write into the input box in the bottom of the view.
\r
10 After the command has been written, it can be executed by pressing ENTER. If the command
\r
11 contains syntax errors they are written to the console in red text and indication for the
\r
14 Multi-line commands can be written by creating a new line with CTRL-ENTER.
\r
15 The command history can be browsed with CTRL-UP and CTRL-DOWN.
\r
16 Also the standard keybindings CTRL-c (Copy), CTRL-v (Paste), CTRL-x (Cut), CTRL-a (Select all) work as expected
\r
17 both in the input and output area of the console depending on which of them has a focus.
\r
18 You can also write (or paste) multiple commands at the same time.
\r
20 If the command you write into console results as an ordinary value, it is printed
\r
21 to the console. Here are couple of examples you can try:
\r
30 > "Hello " + "world!"
\r
36 The console remembers the variables you declare, but they are forgotten when the
\r
37 console (or the whole application) is closed.
\r
48 If you write a command that prints something as a side-effect, the prints are shown in the console:
\r
51 > print "Hello" ; print "world!"
\r
56 The currently running command can be interrupted with **Interrupt current command** button
\r
57 in the top right corner of the console.
\r
58 All commands don't support interruption.
\r
59 The output area of the console can be cleared with **Clear console** button.
\r
61 ## Importing modules
\r
63 The rightmost button in the console opens a dialog for managing modules that are available
\r
64 for the console. It shows currently imported modules and contains buttons for importing
\r
65 modules from different sources. The imported modules are remembered even when the console
\r
66 is closed if the import is marked persistent.
\r
68 The another way to import modules is run import command from the console, for example
\r
70 import "Simantics/DB"
\r
72 The button with two arrows reloads the modules that are imported to the console. It
\r
73 is useful if you develop your own module and want to test modified definitions.