Examples ======== This section provides examples organized by Scade models. These models are not necessarily correct. They simply provide some data for the scripts to process. The overall structure of an example script is as follows: * Retrieve one or more Scade model elements from the project. * Apply a command from ``ansys.scade.apitools`` to these elements. * Print some feedback. .. note:: The examples for the :py:mod:`create ` package have a different design, described in the appropriate example sections. Run the examples ---------------- For a reminder on SCADE Python scripts, see :ref:`SCADE scripting `. SCADE GUI ~~~~~~~~~ The examples associated with a Scade model are referenced in the project: * Load the model with the SCADE Suite. * From the **FileView**, open any script. * To execute the script, select **Tools > Execute script**. * In the **Output** window, observe the result on the **Script** tab. SCADE CLI ~~~~~~~~~ The easiest way to use the SCADE CLI consists of setting the current directory to the considered example's directory and running the ``scade.exe -script`` command: .. code:: bash scade.exe -script