General operations¶
Activate YACS module¶
To work with YACS module the user can activate it in two ways:
by activating YACS item in Modules toolbar,
by click YACS toolbar button on Modules toolbar.
For the correct activation of YACS module it is necessary to install YACS GUI libraries and set YACS_ROOT_DIR environment variable pointed to the directory with installed binaries.
If there is no any study opened/created, during the YACS module activation the user has possibility to choose between opening an existing study and creating a new one. When YACS module has been activated, YACS GUI Main Menu and Toolbars corresponding to the state when no calculation schema is being edited or run are shown:

In such a case there are only possibilities for the user to create or import (YACS or SUPERV XML) a schema.
Object Browser shows tree representation of YACS objects in the current study.
Import/Export a schema¶
To display either in 2D Viewer or in the Object Browser and Tree View and edit a schema the user can import the schemas’ XML file. The modified schema object can be saved into the specified XML file with help of Export a schema to a file YACS GUI command.
Import YACS calculation schema¶
The command Import Schema –> YACS XML is accessible from File or from the corresponding toolbar button on the YACS toolbar, no schema loaded. On this command call a standard open file dialog box appears and lets user to select desirable YACS XML file.

Import YACS XML schema dialog
Imported schema is shown as an entry in Object Browser.
If a selected YACS XML file has incorrect structure, a part of a schema that has been imported successfully (before an error occurred) will be represented in Object Browser and 2D Viewer and the user will be able to work with it. YACS GUI shows an error message with error description in such a case.
Dimensions of drawing area occupied by a graph, positions and dimensions of node presentations, positions of internal link points and type of Change 2D representation of a schema is retrieved from YACS XML file in order to correct 2D representation of the schema in the 2D Viewer.
Import SALOME Supervisor graph¶
This operation is intended for importing an XML files containing description of calculation schema and having logical structure adopted by old SALOME 4 Supervisor module. The command Import Schema –> SUPERV XML is available from File. On this command call a standard open file dialog box appears and lets user to select desirable SUPERV XML file.

Import SUPERV XML schema dialog
Imported schema is shown as an entry in Object Browser.
If a selected SUPERV XML file has incorrect structure, a part of a schema that has been imported successfully (before an error occurred) will be represented in Object Browser and 2D Viewer and the user will be able to work with it. YACS GUI shows an error message with error description in such a case.
After importing of the SUPERV XML file has been completed a 2D representation of the schema (nodes and links) is displayed in the 2D Viewer.
Export a schema to a file¶
If user wants to store modifications done in the existing schema or save a new created graph into the YACS XML file, it is needed to make the schema active and choose the Export schema command from File or the corresponding toolbar button on the YACS toolbar, edition mode. As a result a standard save file dialog appears and lets user input or select desirable YACS XML file name to export the active schema in it.

Export schema dialog
YACS module writes description of a schema and its child objects into an XML file. Additionally, schema 2D presentation data is saved in new created XML file.
Open/Save a study¶
The user can start his work with the saved earlier study document. To open a saved study, the user has to activate common SALOME GUI operation with help of Open command from File or Open document toolbar button on the Standard toolbar. SALOME unpacks YACS XML files from the study. YACS module reads them and recreates the study structure. If XML files in a study have incorrect structure, YACS GUI says that the loaded study is incomplete by showing an error message.

Open a study dialog
If the user has finished his work, he can save a study by calling Save command from File or Save document toolbar button on the Standard toolbar. YACS module stores all schemas from the current study to XML files, which are then packed into a single HDF5 study file by SALOME.

Save a study dialog
Set user preferences¶
In the frames of the YACS module the user has a possibility to set his own preferences. The preferences are regrouped in four tabs:
General: Font for Python script, user catalog loaded by default, external python editor if needed, arrangement mode for widgets, various options for the display of links and the creation mode for service nodes.
Links colors
Nodes and ports colors
Node States Colors: in edition and execution
These preferences can be set by the user with help of standard SALOME GUI operation of editing preferences: Preferences … command from File.
After the user has changed the preferences in the Preferences dialog box for YACS module, the system applies the new values of preferences to relevant objects either immediately, or only to new instance of objects and, at least, when the schema or the study is saved and reopened.

Preferences dialog for YACS module, General tab

Preferences dialog for YACS module, Link Color tab

Preferences dialog for YACS module, Nodes tab

Preferences dialog for YACS module, Node States tab
Select an object¶
Object Browser, Tree View and 2D Viewer provides user with the possibility to select an object. The user can select objects in 2D Viewer or Tree View. Synchronisation beetwen Tree View, 2D Viewer and Input Panel is automatic.

Port selection
In 2D Viewer the user can select/highlight nodes, ports and links. In the Tree View the user can select containers definitions, component instances definitions, nodes, ports, data types and links.
Today, YACS module supports only single selection, i.e. the user clicks on a single object with the mouse.
The 2D Viewer displays selected/highlighted objects in a distinctive way that allows the user to identify the selected/highlighted objects easily.
The system state after interactive selection depends on the type of selected object(s):
A single editable object is selected: Input Panel is shown and contains property pages for the selected object and in some cases for its parent objects in a schema hierarchy. For instance, if an inline script node is selected either in 2D Viewer or in the Tree View, the property page for the selected node will be displayed in the Input Panel. If the user selects SALOME service node, property pages for node, its component and container will be shown in the Input Panel.

Node selection
A single object that has no editable properties is selected: Input Panel remains inchanged, with the previous selection.
Set active schema or run of a schema¶
Active schema is a YACS schema from the current study that is used implicitly in all YACS GUI operations working with a schema. Typically, a study can contain several YACS schemas and several executions (run) for a schema. For some YACS GUI operations such as creation of a node, it is convenient to add a new object (node) to the currently active schema.
YACS GUI allows the user to set a schema/run as active by double click on the schema/run object in the Object Browser or by switching between 2D Viewers showing different schemas/runs.
The active schema is used in creation/execution operations.