EBSILON®Professional Online Documentation
EbsScript / EbsScript Editor / The Menu Bar
In This Topic
    The Menu Bar
    In This Topic

    The Menu Bar


    The Menu "EbsScript"

    The entries under the option "EbsScript" of the menu bar correspond to the entries under the menu "File" in other windows. One finds here commands for handling and managing the EbsScripts. The main command of the EbsScript management is the EbsScript Explorer, which you can open from here.

    The "New" command opens the EbsScript Explorer and adds an new entry. This entry receives the next available EbsScript-ID and a default name (EbsScript_Code_nn, where nn is an integer number). This name is already selected to be edited. It is assumed that you want to give a new name to this EbsScript. After that, you should click on Open in the explorer window to edit this newly created EbsScript. Note that you do not have to click on New in the explorer window, otherwise another EbsScript would be created. If you click on Close in the explorer window, your newly created EbsScript will exist, but will be empty.

    The "Open external"  command opens the EbsScript Explorer. The active EbsScript is selected. You can select a different one and click on Open in the EbsScript Explorer window to edit this EbsScript.

    The "Open internal"  command calls the Open-dialog of the Windows Explorer, in which you can select an EbsScript stored as an external text file. If you click on Open in the Explorer window, you can edit this EbsScript in the EbsScript Editor.

    The "Open Interface Unit" command opens an internal Interface Unit (KernelScripting, Fluid). These units are read-only in the EbsScript editor, because their implementation is a fixed part of EBSILON®Professional .

    The "Close" command closes the edited EbsScript in the EbsScript Editor. If the script is changed, there is a confirmation with the option of saving the changes.

    The "Save" command does not open the EbsScript Explorer. It just saves the actual EbsScript: the internal EbsScripts within the model in memory, and the external ones directly on the hard disk. Note that "Save" does not save your code on the hard disk in case of internal EbsScripts. To save your changes in the ".ebs" file, you must use the command "Save" in the main menu of EBSILON®Professional (this is the same procedure as with other inputs e.g. in the property sheets. The values are stored only in the data memory, until you actually save them on the hard disk).

    The "Save As" command opens the EbsScript Explorer and creates a new entry containing the EbsScript Code, which you have just edited. As in case of the "New" command, here too the next available EbsScript-ID is used and a default name is assumed.

    The "Explorer" command opens the EbsScript Explorer, in which you can carry out your further activities.

    The "Import" command opens a "File Open" dialog, where you can browse for an .esc file (EbsScript), or any text file that contains the EbsScript code you want to import in your model. Select a file and click on Open. The EbsScript Explorer is opened and a new EbsScript is created that contains the code of the file that you have imported. The EbsScript Explorer suggest an EbsScript-ID and a name for that script.

    The "Export" command opens a "Save File As" dialog, where you can select the directory and the name of the file that you want to use to save your code. By default, the file extension will be .esc. Select or type the file name and click on Save. Note that the Export command really stores your script to disk, unlike the "Save" or "Save As" command, which only write to memory. The exported file is a simple text file (with Unicode characters). It contains the code of your EbsScript. The EbsScript name, the description and the EbsScript-ID are not stored. After the "Save As" dialog is closed, the EbsScript Explorer opens, with the current EbsScript selected. You may click on Open to resume editing or select another EbsScript to work on.

    The "Print" command opens a "Select Printer" dialog where you can select a printer to print out the EbsScript code in text format.

    The "Page Setup" command opens a dialog to modify the page layout before printing.

    The "Print Setup" command opens a dialog to modify the printer settings.

    The  "Close" command closes the EbsScript Editor. If a script has been modified, it asks you for a confirmation with the option of saving the changes.

     

    The Menu "Edit"

    "Edit" contains several commands that are helpful when you are editing your text. For many of these commands, a keyboard shortcut exists.

    The "Undo" command (Ctrl+Z) is used to undo the last change you made to your script. It can be repeated several times.

    The "Redo" command (Ctrl+Y) is active just after you carry out an undo. It restores the modifications you just have deleted with undo.

    The "Cut" command (Ctrl+X) is active when a part of the script is selected. The selected text will be copied to the Windows clipboard and deleted in your script.

    The "Copy" command (Ctrl+C) is active when a part of the script is selected. The selected text will be copied to the Windows clipboard and will also remain in your script.

    The "Paste" command (Ctrl+V) is used to insert a text from the Windows clipboard to your script.

    Note that Ctrl+C/Ctrl+V is an easy way to copy parts of text (or even the whole text) from one script to another, or to/from text files.

    The "Delete" command (DEL) deletes the selected part of your script without copying it to the clipboard.

    The "Select All" command (Ctrl+A) highlights the whole text as selected.

    The "Find" command (Ctrl+F) opens an input window where you can specify an expression to be looked for in the text. You can specify the direction of the search and whether it should be case-sensitive and whether the search is restricted to whole words or may include parts of a word.

    The "Find Next" command (F3) is active after you have carried out a "Find" command. It remembers the last expression that you searched for and looks for the next occurrence of this expression in the text, without the need to open the Find dialog again.

    The "Replace"- command (Ctrl+H) opens the "Replace"-Dialog. You can specify a searched expression as well as another expression, which is to replace the first one. With the  "Find Next"- button you can go to the next occurrence of the searched expression. Click "Replace", if you wish to replace it there, or else click "Find Next", to go to its next occurrence without replacing. If you are sure that you want to replace all the occurrences of the searched expression, you can click "Replace All". Depending upon your selection in the "Replace in"- box all the occurrences of the expression are replaced either within the selected part of your script or within the entire script.

    The "Find Previous"- (Shift-F3) command is similar to "Find Next", but works in the reverse direction.

    The "Find in Scripts" command offers a parallel search in several EbsScripts. This is especially useful when an EbsScripts is divided in many units. For the search, you may specify whether you want to search in all EbsScripts that are available in the model or in the EbsScripts that are currently opened or in the current EbsScript only. It is possible to use regular expressions for the search. There are two different sheets to display the results. By activating or deactivating the check box "Display in Find 2" the output will be shown on sheet 1 or 2. When you double-click on a line in the result sheet, the corresponding EbsScript is opened and the corresponding line is displayed.

    The "Replace in Scripts"-command, similar to the "Search in Scripts" enables a parallel search for expressions in several EbsScripts, in order to replace them. In this search it can be specified, whether you wish to refer to all EbsScripts available in the model, to all currently open EbsScripts or only to the currently active EbsScript. Thereby, it is also possible to use regular expressions. Two sheets are available for the output of the search results. By enabling or disabling the check box "Show in search results 2" the output can be done in sheet 1 or sheet 2. Double-clicking the corresponding row in the output sheet opens the corresponding EbsScript and shows the corresponding line. If required, individual scripts can be skipped.

     

    Bookmarks

    Bookmarks are used to mark certain places in a script. This is especially helpful when you are editing are large script with certain procedures and functions. You can use unnumbered or numbered bookmarks.

    To create a numbered bookmark, use the Bookmark menu. First, you have to position the cursor on the line where the bookmark is to be placed. Then, select one of 10 numbered bookmarks that are available in the EbsScript Editor. A blue circle with the corresponding number in it indicates the bookmark for that line.

    The "Go to Bookmark" command is used to go to a specific (numbered) bookmark. To clear the numbered bookmarks, use the command "BookmarkàClear All Bookmarks".

    To create an unnumbered bookmark, use the command "Toggle Bookmark" (or Ctrl-F2). Position the cursor to the line, where the bookmark is to be placed. A blue circle to the left of the line indicates that this line has a bookmark. You can remove the bookmark with another "Toggle Bookmark" (or Ctrl-F2) on the same line. With the command "Next Bookmark" (or F2), you can go from one bookmark to the next through your text, with the command "Previous Bookmark" (or Shift-F2) in the opposite direction.

     

    The Menu "View"

    The menu entries under "View" are used to change the appearance of your Editor. They do not have any influence on the functionality of your EbsScript.

    The menu entries "tool bar is used of the menu entries serves for showing or hiding the Bars of the EbsScript Editor.

       Status bar:

     

    The Menu "Compile"

    The menu entries under "Compile" are used for handling the EbsScript Compiler. For details regarding the compiler, read the chapter EbsScript Compiler in the EbsScript Introduction.

    The command "Syntactic Analysis" starts the compiler for a syntax check only, without running the EbsScript.

    The command "Compile & Run" starts the compiler and, in case of a successful compilation, the execution of the EbsScript.

    The execution of an EbsScript can be cancelled by pressing the ESC key.

    The command "Compile all scripts" starts the compiler one by one for all the scripts.

     

    The Menu "Debug"

    While an EbsScript is running, it is possible to interrupt the execution of the script and to view and also change the values of

    variables. The commands for this debugger can be found under the menu item “Debug“.
    For this, breakpoints have to be set in the script by moving the cursor to the desired line in the EbsScript editor window and clicking F9

    (“Switch breakpoint”). By clicking on F9 one more time, the breakpoint can be removed again.
    The script can then be started with F5 (“Start/continue“) and will run up to the breakpoint. It is possible to have the values of

    variables displayed in the monitoring bar (in the EbsScript editor under View  Toolbars  Monitor) and to change them.
    You can then continue the execution of the script step-by-step with F10 (across procedure activations) and F11 (into procedures),

    respectively, or up to the next breakpoint with F5.

     

    The Menu "Extras"

     

    The entry "Rebuild Object Tree" is used to rebuild the Object Tree again after doing specific modifications in the model, such as deleting, inserting or renaming objects.

     

    The command "Options..." opens a dialog for defining the compiler options, the syntax and the runtime (see EbsScript Compiler).

    The menu item "Options" contains the sheets for settings of the "Editor", the "Syntax" and "Runtime".

    On the sheet editor there is a button "Fonts". This button opens the font selection dialog, in which you can select a font, with your EbsScript appears.

     

    The menu "Window"

    The menu entries under "Window" help in arranging the windows within the EbsScript Editor. They do not have any effect on the calculation.

    The command "Close all" is used to close all windows simultaneously.

    The command "Save all" is used to save all modified EbsScripts simultaneously.

    The command "New Window" opens a new window for the current EbsScript being edited. In this way, different areas of the script can be viewed simultaneously.

    The command "Cascade Windows" arranges all the windows open in the EbsScript Editor in a cascading (overlapping) way.

    The command "Tile Horizontally" arranges all the windows open in the EbsScript Editor horizontally.

    The command "Tile Vertically" arranges all the windows open in the EbsScript Editor vertically.

    The command "Next Window"

    The command "Previous Window"

    The entries in the lower region of the menu enable you to activate a window from the ones opened in the EbsScript Editor.

     

    The Menu "?"

    The entry "Help" displays the EbsScript page of the EBSILON®Professional online help.

    The entry "?" opens a window, which shows the current release and contact information.