#################### Schematic Editor API #################### **Module:** ``typhoon.api.schematic_editor`` Schematic API provides set of functions/methods to manipulate existing schematic models (tse files) and create new ones from scratch programmaticaly. This is most commonly used for creating scripts for **testing** and **automating** repetitive tasks, but its use is not restricted for these use cases only. Examples -------- Following two examples illustrates how you can use Typhoon Schematic Editor API. Example 1 ========= This example illustrates creating model from scratch, saving it and compiling it as a last step. .. literalinclude:: sch_api_examples/create_RLC_model.py :language: python :lines: 2- Script output: .. program-output:: python sch_api_examples/create_RLC_model.py After executing this script, model is saved in a file **"RLC_example.tse** in directory where script is located. Following image shows how model looks like if opened in Typhoon Schematic Editor. .. figure:: img/rlc_example_pic.png Example 2 ========= This example ilustrates loading an existing model (created in previous example) and modyfing it, saving changes and compiling it as a last step. .. literalinclude:: sch_api_examples/modyfing_created_model.py :language: python :lines: 2- Script output: .. program-output:: python sch_api_examples/modyfing_created_model.py Schematic API constants ----------------------- **Module:** ``typhoon.api.schematic_editor.const`` Various Schematic API method expects predefined constants for some of their parameters. Below is a listing (Python module) of all constants which are used in Schematic API methods. .. literalinclude:: ../../../typhoon/api/schematic_editor/const.py :language: python :lines: 5- Positioning ----------- Schematic scene coordinate system origin (0, 0) is in the top left corner of whole scene. Schematic scene size is 16k pixels (16384), so scheme scene center point will (8192, 8192). Schematic model configuration ----------------------------- Schematic model configuration is manipulated with ``get_model_property_value`` and ``set_model_property_value`` methods. See API references section for detailed description of these two functions. `API references`_ ----------------- .. autoclass:: typhoon.api.schematic_editor.SchematicAPI :members: