{"id":180947,"date":"2024-01-03T11:21:33","date_gmt":"2024-01-03T11:21:33","guid":{"rendered":"\/knowledge\/forums\/topic\/using-the-scade-python-apis-from-your-favorite-ide\/"},"modified":"2026-09-30T10:11:01","modified_gmt":"2026-09-30T10:11:01","slug":"using-the-scade-python-apis-from-your-favorite-ide","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/using-the-scade-python-apis-from-your-favorite-ide\/","title":{"rendered":"Using the SCADE Python APIs from your favorite IDE"},"content":{"rendered":"<p style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2026\/09\/scade-005-banner-scaled.jpeg\" style=\"max-height: 700px !important\" \/>\n<\/p>\n<p>Like most Ansys products, SCADE comes with a comprehensive Python API. It allows you to programmatically use SCADE to automate tasks (e.g. setting up a CI\/CD toolchain for your SCADE models).<br \/>\nIn this article, we&#8217;ll explore how to set up your favorite Integrated Development Environment (IDE) to write and debug Python code interacting with SCADE.<\/p>\n<h4  id=\"REQUIREMENTS\">Requirements<\/h4>\n<p>To get started, you&#8217;ll need access to SCADE developer docs, a working installation of SCADE, a sample Python script to test that all works as intended, and of course, your trusty IDE. Let&#8217;s tick these off one by one.<\/p>\n<h5  id=\"SCADE-PYTHON-API-DOCS\">SCADE Python API docs<\/h5>\n<p>As a developer, your go-to page for working with SCADE should be <a href=\"https:\/\/developer.ansys.com\/scade\">developer.ansys.com\/scade<\/a>. On there, you will find key resources such as the SCADE Python API Guide.<br \/>\nAt the time of this writing, the page points to the guide for version 2023 R2.<br \/>\nThe API allows you to:<\/p>\n<ul>\n<li>Programmatically read and modify SCADE models, test results, and generated artifacts.<\/li>\n<li>Run SCADE jobs such as code generation or model testing.<\/li>\n<\/ul>\n<h5  id=\"A-LOCAL-SCADE-INSTALLATION\">A local SCADE installation<\/h5>\n<p>To interact with SCADE, you need a local installation of the SCADE product<a href=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2024\/01\/scade-005-sherlock.gif\">.<\/a><\/p>\n<p>It comes with:<\/p>\n<ul>\n<li>A distribution of Python. For instance, SCADE 2023 R2 embeds Python 3.10 64bit under <code>\/contrib\/Python310<\/code><\/li>\n<li>A Python implementation of the SCADE API library, under <code>\/SCADE\/APIs\/Python\/lib<\/code><\/li>\n<li>Binary executables that will be used to execute some functions of the API (e.g. code generation), under <code>\/SCADE\/bin<\/code><\/li>\n<\/ul>\n<hr \/>\n<p><em>Note<\/em>: you may use your own distribution of Python instead of the one provided with SCADE. Should you opt for this, please make sure you extend your <code>PYTHONPATH<\/code> environment variable with the above directories.<\/p>\n<hr \/>\n<h5  id=\"A-SAMPLE-STARTER-SCRIPT\">A sample starter script<\/h5>\n<p>Let&#8217;s get started with a basic script template that opens a SCADE project and sets it up for use through the API. It will allow you to verify that your IDE setup is correct and functional.<\/p>\n<p>First, we need to load the project itself, represented by a <code>.etp<\/code> file on disk.<\/p>\n<p>When using your IDE of choice, you&#8217;ll need some preamble code to explicitly load a project:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff;overflow:auto;width:auto;background:none;border:none;padding:.2em .6em\">\n<pre style=\"margin: 10;font-family: Consolas !important;line-height: 125%\"><span><\/span><span style=\"color: #998 !important;font-style: italic\">##<\/span>\n<span style=\"color: #998 !important;font-style: italic\"># identical to scade -script ...<\/span>\n<span style=\"font-weight: bold\">import<\/span><span style=\"color: #BBB !important\"> <\/span><span style=\"color: #555 !important\">scade_env<\/span>\nscade_env<span style=\"font-weight: bold\">.<\/span>load_project(<span style=\"color: #B84 !important\">'path\/to\/my\/scade\/project.etp'<\/span>)\n<span style=\"color: #998 !important;font-style: italic\">##<\/span>\n<\/pre>\n<\/div>\n<hr \/>\n<p><em>Note:<\/em> SCADE supports running Python scripts directly from its user interface (known as SCADE Studio) or from the command line:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff;overflow:auto;width:auto;background:none;border:none;padding:.2em .6em\">\n<pre style=\"margin: 10;font-family: Consolas !important;line-height: 125%\"><span><\/span>scade.exe -script ... []\n<\/pre>\n<\/div>\n<p>In both cases, the project is automatically loaded by the SCADE executable before the Python script starts. Therefore, there is no need to explicitly load a project and the <code>load_project<\/code> call is simply ignored.<\/p>\n<hr \/>\n<p>Next, we&#8217;ll import some API modules:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff;overflow:auto;width:auto;background:none;border:none;padding:.2em .6em\">\n<pre style=\"margin: 10;font-family: Consolas !important;line-height: 125%\"><span><\/span><span style=\"font-weight: bold\">import<\/span><span style=\"color: #BBB !important\"> <\/span><span style=\"color: #555 !important\">scade.model.project.stdproject<\/span><span style=\"color: #BBB !important\"> <\/span><span style=\"font-weight: bold\">as<\/span><span style=\"color: #BBB !important\"> <\/span><span style=\"color: #555 !important\">project<\/span>\n<span style=\"font-weight: bold\">from<\/span><span style=\"color: #BBB !important\"> <\/span><span style=\"color: #555 !important\">scade<\/span><span style=\"color: #BBB !important\"> <\/span><span style=\"font-weight: bold\">import<\/span> output\n<\/pre>\n<\/div>\n<hr \/>\n<p><em>Note<\/em>: SCADE comes with two project APIs:<\/p>\n<ul>\n<li><code>scade.model.project.natproject<\/code>: pure Python API.<\/li>\n<li><code>scade.model.project.stdproject<\/code>: SCADE Studio API.<\/li>\n<\/ul>\n<p>The documentation advises importing <code>scade.model.project<\/code> which resolves to one of the above APIs depending on the name of the executable running the script: <code>vcs.exe<\/code> or <code>stdtcl.exe<\/code> on one hand, any other executable like <code>python.exe<\/code> on the other hand.<br \/>\nIn our sample script however, importing <code>stdproject<\/code> directly ensures that scripts behave the exact same way, whether they are launched from a SCADE environment or an external Python environment.<\/p>\n<hr \/>\n<p>Finally, we can add some basic statements to navigate the model and print some information:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff;overflow:auto;width:auto;background:none;border:none;padding:.2em .6em\">\n<pre style=\"margin: 10;font-family: Consolas !important;line-height: 125%\"><span><\/span>projects <span style=\"font-weight: bold\">=<\/span> project<span style=\"font-weight: bold\">.<\/span>get_roots()\n<span style=\"font-weight: bold\">for<\/span> p <span style=\"font-weight: bold\">in<\/span> projects:\n    <span style=\"font-weight: bold\">assert<\/span> <span style=\"color: #999 !important\">isinstance<\/span>(p, project<span style=\"font-weight: bold\">.<\/span>Project)\n    output(p<span style=\"font-weight: bold\">.<\/span>pathname <span style=\"font-weight: bold\">+<\/span> <span style=\"color: #B84 !important\">'n'<\/span>)\n<\/pre>\n<\/div>\n<hr \/>\n<p><em>Note<\/em>: The <code>assert<\/code> statement may help your IDE realize that <code>p<\/code> is of type <code>Project<\/code>.<\/p>\n<hr \/>\n<p>Here is the final script, all put together:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff;overflow:auto;width:auto;background:none;border:none;padding:.2em .6em\">\n<pre style=\"margin: 10;font-family: Consolas !important;line-height: 125%\"><span><\/span><span style=\"color: #998 !important;font-style: italic\">##<\/span>\n<span style=\"color: #998 !important;font-style: italic\"># identical to scade -script ... <\/span>\n<span style=\"font-weight: bold\">import<\/span><span style=\"color: #BBB !important\"> <\/span><span style=\"color: #555 !important\">scade_env<\/span>\nscade_env<span style=\"font-weight: bold\">.<\/span>load_project(<span style=\"color: #B84 !important\">'path\/to\/my\/scade\/project.etp'<\/span>)\n<span style=\"color: #998 !important;font-style: italic\">##<\/span>\n\n<span style=\"font-weight: bold\">import<\/span><span style=\"color: #BBB !important\"> <\/span><span style=\"color: #555 !important\">scade.model.project.stdproject<\/span><span style=\"color: #BBB !important\"> <\/span><span style=\"font-weight: bold\">as<\/span><span style=\"color: #BBB !important\"> <\/span><span style=\"color: #555 !important\">project<\/span>\n<span style=\"font-weight: bold\">from<\/span><span style=\"color: #BBB !important\"> <\/span><span style=\"color: #555 !important\">scade<\/span><span style=\"color: #BBB !important\"> <\/span><span style=\"font-weight: bold\">import<\/span> output\n\nprojects <span style=\"font-weight: bold\">=<\/span> project<span style=\"font-weight: bold\">.<\/span>get_roots()\n<span style=\"font-weight: bold\">for<\/span> p <span style=\"font-weight: bold\">in<\/span> projects:\n    <span style=\"font-weight: bold\">assert<\/span> <span style=\"color: #999 !important\">isinstance<\/span>(p, project<span style=\"font-weight: bold\">.<\/span>Project)\n    output(p<span style=\"font-weight: bold\">.<\/span>pathname <span style=\"font-weight: bold\">+<\/span> <span style=\"color: #B84 !important\">'n'<\/span>)\n<\/pre>\n<\/div>\n<h4  id=\"SETTING-UP-YOUR-FAVORITE-IDE\">Setting up your favorite IDE<\/h4>\n<p>Now that we have the basics, let&#8217;s look at setting up your IDE. In this article, we&#8217;ll look at three popular ones: Visual Studio Code (or VS Code), PyCharm and Visual Studio.<\/p>\n<h5  id=\"VISUAL-STUDIO-CODE\">Visual Studio Code<\/h5>\n<p>Visual Studio Code (<a href=\"https:\/\/code.visualstudio.com\">code.visualstudio.com<\/a>) is a free open-source IDE. It is popular because of its customizability through numerous extensions.<\/p>\n<h6  id=\"INSTALLATION\">Installation<\/h6>\n<p>Install &amp; launch the IDE, then install the Python extension:<\/p>\n<ul>\n<li>Open the Extensions panel with <code>Ctrl + Shift + X<\/code><\/li>\n<li>Type <code>python<\/code> in the search field<\/li>\n<li>Click &#8216;install&#8217; for extension &#8216;Python&#8217;<\/li>\n<\/ul>\n<p style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2024\/01\/scade-005-vscode-install.gif\" style=\"max-height: 700px !important\" \/><br \/>\n<em>Installing the Python extension<\/em>\n<\/p>\n<h6  id=\"PROJECT-CREATION-CONFIGURATION\">Project creation &amp; configuration<\/h6>\n<p>A VSCode project, or more precisely a workspace, is a directory. Simply drag and drop a directory containing the above test script onto the IDE window to initialize a Python project. In your project, create a folder called <code>.vscode<\/code>. Inside folder <code>.vscode<\/code>, create a file called <code>settings.json<\/code> with the following content:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff;overflow:auto;width:auto;background:none;border:none;padding:.2em .6em\">\n<pre style=\"margin: 10;font-family: Consolas !important;line-height: 125%\"><span><\/span>{\n<span style=\"color: #BBB !important\">    <\/span><span style=\"color: #998 !important;font-style: italic\">\/\/ Use Python interpreter embedded with SCADE<\/span>\n<span style=\"color: #BBB !important\">    <\/span><span style=\"color: #000080 !important\">\"python.defaultInterpreterPath\"<\/span>:<span style=\"color: #BBB !important\"> <\/span><span style=\"color: #B84 !important\">\"\/contrib\/Python310\/python.exe\"<\/span>,\n<span style=\"color: #BBB !important\">    <\/span><span style=\"color: #998 !important;font-style: italic\">\/\/ Enable Intellisense autocomplete<\/span>\n<span style=\"color: #BBB !important\">    <\/span><span style=\"color: #000080 !important\">\"python.autoComplete.extraPaths\"<\/span>:<span style=\"color: #BBB !important\"> <\/span>[\n<span style=\"color: #BBB !important\">        <\/span><span style=\"color: #B84 !important\">\"\/SCADE\/bin\"<\/span>,\n<span style=\"color: #BBB !important\">        <\/span><span style=\"color: #B84 !important\">\"\/SCADE\/APIs\/Python\/lib\"<\/span>\n<span style=\"color: #BBB !important\">    <\/span>],\n<span style=\"color: #BBB !important\">    <\/span><span style=\"color: #000080 !important\">\"python.analysis.extraPaths\"<\/span>:<span style=\"color: #BBB !important\"> <\/span>[\n<span style=\"color: #BBB !important\">        <\/span><span style=\"color: #B84 !important\">\"\/SCADE\/APIs\/Python\/lib\"<\/span>\n<span style=\"color: #BBB !important\">    <\/span>]\n}\n<\/pre>\n<\/div>\n<p>This tells VSCode to use the Python interpreter embedded with SCADE and enables autocomplete for the SCADE API. Inside folder <code>.vscode<\/code>, create a file called <code>launch.json<\/code> with the following content:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff;overflow:auto;width:auto;background:none;border:none;padding:.2em .6em\">\n<pre style=\"margin: 10;font-family: Consolas !important;line-height: 125%\"><span><\/span>{\n<span style=\"color: #BBB !important\">    <\/span><span style=\"color: #000080 !important\">\"version\"<\/span>:<span style=\"color: #BBB !important\"> <\/span><span style=\"color: #B84 !important\">\"0.2.0\"<\/span>,\n<span style=\"color: #BBB !important\">    <\/span><span style=\"color: #000080 !important\">\"configurations\"<\/span>:<span style=\"color: #BBB !important\"> <\/span>[\n<span style=\"color: #BBB !important\">        <\/span>{\n<span style=\"color: #BBB !important\">            <\/span><span style=\"color: #000080 !important\">\"name\"<\/span>:<span style=\"color: #BBB !important\"> <\/span><span style=\"color: #B84 !important\">\"Python: Current File\"<\/span>,\n<span style=\"color: #BBB !important\">            <\/span><span style=\"color: #000080 !important\">\"type\"<\/span>:<span style=\"color: #BBB !important\"> <\/span><span style=\"color: #B84 !important\">\"python\"<\/span>,\n<span style=\"color: #BBB !important\">            <\/span><span style=\"color: #000080 !important\">\"request\"<\/span>:<span style=\"color: #BBB !important\"> <\/span><span style=\"color: #B84 !important\">\"launch\"<\/span>,\n<span style=\"color: #BBB !important\">            <\/span><span style=\"color: #000080 !important\">\"program\"<\/span>:<span style=\"color: #BBB !important\"> <\/span><span style=\"color: #B84 !important\">\"${file}\"<\/span>,\n<span style=\"color: #BBB !important\">            <\/span><span style=\"color: #000080 !important\">\"console\"<\/span>:<span style=\"color: #BBB !important\"> <\/span><span style=\"color: #B84 !important\">\"integratedTerminal\"<\/span>,\n<span style=\"color: #BBB !important\">            <\/span><span style=\"color: #000080 !important\">\"justMyCode\"<\/span>:<span style=\"color: #BBB !important\"> <\/span><span style=\"font-weight: bold\">true<\/span>,\n<span style=\"color: #BBB !important\">            <\/span><span style=\"color: #000080 !important\">\"env\"<\/span>:<span style=\"color: #BBB !important\"> <\/span>{<span style=\"color: #000080 !important\">\"PYTHONPATH\"<\/span>:<span style=\"color: #BBB !important\"> <\/span><span style=\"color: #B84 !important\">\"\/SCADE\/APIs\/Python\/lib;\/SCADE\/bin\"<\/span>},\n<span style=\"color: #BBB !important\">        <\/span>}\n<span style=\"color: #BBB !important\">    <\/span>]\n}\n<\/pre>\n<\/div>\n<p>This ensures that the SCADE API library is used at runtime. Your VSCode project structure should now look as follows:<\/p>\n<p style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2024\/01\/scade-005-vscode-project-structure.png\" style=\"max-height: 700px !important\" \/><br \/>\n<em>VSCode project structure<\/em>\n<\/p>\n<h6  id=\"RESULTS\">Results<\/h6>\n<p>You may run and\/or debug your Python script. The debug view allows you to peek into the variables and their structure:<\/p>\n<p style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2024\/01\/scade-005-vscode-debug.png\" style=\"max-height: 700px !important\" \/><br \/>\n<em>Debugging a SCADE Python script in VSCode<\/em>\n<\/p>\n<h5  id=\"PYCHARM\">PyCharm<\/h5>\n<p>PyCharm (<a href=\"https:\/\/jetbrains.com\/pycharm\">jetbrains.com\/pycharm<\/a>) is another popular IDE, specific to Python.<\/p>\n<h6  id=\"PROJECT-CREATION-CONFIGURATION\">Project creation &amp; configuration<\/h6>\n<p>Click &quot;File&quot; then &quot;New Project&#8230;&quot; to open this dialog:<\/p>\n<p style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2024\/01\/scade-005-pycharm-new-project.png\" style=\"max-height: 700px !important\" \/><br \/>\n<em>New PyCharm project<\/em>\n<\/p>\n<p>Click &quot;Add Interpreter&quot; to add the Python executable delivered with your installation of SCADE:<\/p>\n<p style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2024\/01\/scade-005-pycharm-add-interpreter.png\" style=\"max-height: 700px !important\" \/><br \/>\n<em>Adding a Python interpreter to PyCharm<\/em>\n<\/p>\n<p>Complete project creation by clicking &quot;OK&quot;, then &quot;Create&quot;. Click &quot;File&quot; then &quot;Settings&#8230;&quot; to open the settings window. Configure &quot;Project Structure&quot; as follows:<\/p>\n<p style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2024\/01\/scade-005-pycharm-project-structure.png\" style=\"max-height: 700px !important\" \/><br \/>\n<em>PyCharm project structure to work with SCADE APIs<\/em>\n<\/p>\n<p>Use button &quot;+ Add Content Root&quot; to add the following folders:<\/p>\n<ul>\n<li><code>SCADEAPIsPythonlib<\/code><\/li>\n<li><code>SCADEbin<\/code><\/li>\n<\/ul>\n<p>This tells PyCharm to use the SCADE API sources for autocompletion services.<\/p>\n<h6  id=\"RESULTS\">Results<\/h6>\n<p>You may run and\/or debug your Python script. The debug view allows you to peek into the variables and their structure:<\/p>\n<p style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2024\/01\/scade-005-pycharm-debug.png\" style=\"max-height: 700px !important\" \/><br \/>\n<em>Debugging a SCADE Python script in PyCharm<\/em>\n<\/p>\n<h5  id=\"VISUAL-STUDIO\">Visual Studio<\/h5>\n<p>Visual Studio (<a href=\"https:\/\/visualstudio.microsoft.com\">visualstudio.microsoft.com<\/a>) is a popular IDE for .NET and C++ development on Windows. It can support Python development thanks to extensions.<\/p>\n<h6  id=\"INSTALLATION\">Installation<\/h6>\n<p>Upon installation of Visual Studio, make sure to tick the Python Workload:<\/p>\n<p style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2024\/01\/scade-005-visual-studio-install-python-workload.png\" style=\"max-height: 700px !important\" \/><br \/>\n<em>Visual Studio installation with Python Workload<\/em>\n<\/p>\n<h6  id=\"PROJECT-CREATION-CONFIGURATION\">Project creation &amp; configuration<\/h6>\n<p>Click &quot;File&quot;, &quot;New&quot;, then &quot;Project&quot; to open the new project dialog. Select &quot;From Existing Python code&quot; then click &quot;Next&quot;:<\/p>\n<p style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2024\/01\/scade-005-visual-studio-new-project.png\" style=\"max-height: 700px !important\" \/><br \/>\n<em>Creating a new Python project in Visual Studio<\/em>\n<\/p>\n<p>Fill in your preferred project name and path, then finalize by clicking &quot;Create&quot;. Your Solution Explorer should look like this:<\/p>\n<p style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2024\/01\/scade-005-visual-studio-project-structure.png\" style=\"max-height: 700px !important\" \/><br \/>\n<em>Solution Explorer before project configuration<\/em>\n<\/p>\n<p>By default, the project uses one of your standard installed Python interpreters. We recommend using the Python environment installed with SCADE. To do so, right click &quot;Python Environments&quot;, then &quot;View All Python Environments&quot;. Click &quot;Add Environment&quot; and fill the pop-up as follows:<\/p>\n<p style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2024\/01\/scade-005-visual-studio-add-python-environment.png\" style=\"max-height: 700px !important\" \/><br \/>\n<em>Adding the SCADE Python environment to Visual Studio (shown for SCADE 2024 R1)<\/em>\n<\/p>\n<p>Click &quot;Add&quot; to apply your changes. The new Python environment should now be selected in your Solution Explorer view. Next, right-click &quot;Search Paths&quot; and select &quot;Add Folder to Search Path&#8230;&quot; twice to add the following folders:<\/p>\n<ul>\n<li><code>SCADEAPIsPythonlib<\/code><\/li>\n<li><code>SCADEbin<\/code><\/li>\n<\/ul>\n<p>This tells Visual Studio to use the SCADE API sources for autocompletion services. Make sure to drop the sample Python script into your project folder. Your Solution Explorer view should now look as follows:<\/p>\n<p style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2024\/01\/scade-005-visual-studio-project-structure.png\" style=\"max-height: 700px !important\" \/><br \/>\n<em>Complete project structure<\/em>\n<\/p>\n<h6  id=\"RESULTS\">Results<\/h6>\n<p>You may run and\/or debug your Python script. The debug view allows you to peek into the variables and their structure:<\/p>\n<p style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2024\/01\/scade-005-visual-studio-debug.png\" style=\"max-height: 700px !important\" \/><br \/>\n<em>Debugging a SCADE Python script in Visual Studio<\/em>\n<\/p>\n<h4  id=\"QUESTIONS\">Questions?<\/h4>\n<p>Once this small test script works in your IDE of choice, you are ready to go! Remember to refer to the API documentation over at <a href=\"https:\/\/developer.ansys.com\/scade\">developer.ansys.com\/scade<\/a> as you develop. If you have questions or feedback, don&#8217;t hesitate to ask our <a href=\"https:\/\/innovation.ansys.com\/public\/forum\">Ansys expert community<\/a> .<\/p>\n<h4  id=\"ABOUT-THE-AUTHOR\">About the author<\/h4>\n<table style=\"max-width: 1000px;border: none !important\">\n<thead>\n<tr>\n<td style=\"padding: 0px 10px;min-width: 150px;border: none !important\"><img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/knowledge\/wp-content\/uploads\/sites\/4\/2026\/08\/scade-jhenry.png\" style=\"max-height: 150px !important\" \/><\/td>\n<td style=\"padding: 0px 10px;min-width: 150px;border: none !important\"><strong>Jean Henry<\/strong> (<a href=\"https:\/\/www.linkedin.com\/in\/jean-henry-bb16792\/\">LinkedIn<\/a>) is a Senior Principal Product Specialist at Synopsys. He has been working on the SCADE product since its inception, more than 30 years ago. He has expertise in software development, testing and integration.<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<\/tbody>\n<\/table>\n","protected":false},"template":"","class_list":["post-180947","topic","type-topic","status-publish","hentry","topic-tag-api","topic-tag-ide","topic-tag-pycharm","topic-tag-python","topic-tag-scade","topic-tag-visual-studio","topic-tag-vscode"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Like most Ansys products, SCADE comes with a comprehensive Python API. It allows you to programmatically use SCADE to automate tasks (e.g. setting up a CI\/CD toolchain for your SCADE models). In this article, we&#039;ll explore how to set up your favorite Integrated Development Environment (IDE) to write and debug Python code interacting with SCADE.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/using-the-scade-python-apis-from-your-favorite-ide\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Ansys Knowledge | Ansys Innovation Space\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Using the SCADE Python APIs from your favorite IDE | Ansys Knowledge\" \/>\n\t\t<meta property=\"og:description\" content=\"Like most Ansys products, SCADE comes with a comprehensive Python API. It allows you to programmatically use SCADE to automate tasks (e.g. setting up a CI\/CD toolchain for your SCADE models). In this article, we&#039;ll explore how to set up your favorite Integrated Development Environment (IDE) to write and debug Python code interacting with SCADE.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/using-the-scade-python-apis-from-your-favorite-ide\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-01-03T11:21:33+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-09-30T10:11:01+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Using the SCADE Python APIs from your favorite IDE | Ansys Knowledge\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Like most Ansys products, SCADE comes with a comprehensive Python API. It allows you to programmatically use SCADE to automate tasks (e.g. setting up a CI\/CD toolchain for your SCADE models). In this article, we&#039;ll explore how to set up your favorite Integrated Development Environment (IDE) to write and debug Python code interacting with SCADE.\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/using-the-scade-python-apis-from-your-favorite-ide\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/#listItem\",\"name\":\"Topics\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/#listItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/api\\\/#listItem\",\"name\":\"api\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/api\\\/#listItem\",\"position\":3,\"name\":\"api\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/api\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/using-the-scade-python-apis-from-your-favorite-ide\\\/#listItem\",\"name\":\"Using the SCADE Python APIs from your favorite IDE\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/#listItem\",\"name\":\"Topics\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/using-the-scade-python-apis-from-your-favorite-ide\\\/#listItem\",\"position\":4,\"name\":\"Using the SCADE Python APIs from your favorite IDE\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/api\\\/#listItem\",\"name\":\"api\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#organization\",\"name\":\"Ansys Knowledge\",\"description\":\"Ansys Innovation Space\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/using-the-scade-python-apis-from-your-favorite-ide\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/using-the-scade-python-apis-from-your-favorite-ide\\\/\",\"name\":\"Using the SCADE Python APIs from your favorite IDE | Ansys Knowledge\",\"description\":\"Like most Ansys products, SCADE comes with a comprehensive Python API. It allows you to programmatically use SCADE to automate tasks (e.g. setting up a CI\\\/CD toolchain for your SCADE models). In this article, we'll explore how to set up your favorite Integrated Development Environment (IDE) to write and debug Python code interacting with SCADE.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/using-the-scade-python-apis-from-your-favorite-ide\\\/#breadcrumblist\"},\"datePublished\":\"2024-01-03T11:21:33+00:00\",\"dateModified\":\"2026-09-30T10:11:01+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#website\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/\",\"name\":\"Ansys Knowledge\",\"description\":\"Ansys Innovation Space\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Using the SCADE Python APIs from your favorite IDE | Ansys Knowledge","description":"Like most Ansys products, SCADE comes with a comprehensive Python API. It allows you to programmatically use SCADE to automate tasks (e.g. setting up a CI\/CD toolchain for your SCADE models). In this article, we'll explore how to set up your favorite Integrated Development Environment (IDE) to write and debug Python code interacting with SCADE.","canonical_url":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/using-the-scade-python-apis-from-your-favorite-ide\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/using-the-scade-python-apis-from-your-favorite-ide\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge#listItem","position":1,"name":"Home","item":"https:\/\/innovationspace.ansys.com\/knowledge","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/#listItem","name":"Topics"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/#listItem","position":2,"name":"Topics","item":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/api\/#listItem","name":"api"},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/api\/#listItem","position":3,"name":"api","item":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/api\/","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/using-the-scade-python-apis-from-your-favorite-ide\/#listItem","name":"Using the SCADE Python APIs from your favorite IDE"},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/#listItem","name":"Topics"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/using-the-scade-python-apis-from-your-favorite-ide\/#listItem","position":4,"name":"Using the SCADE Python APIs from your favorite IDE","previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/api\/#listItem","name":"api"}}]},{"@type":"Organization","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#organization","name":"Ansys Knowledge","description":"Ansys Innovation Space","url":"https:\/\/innovationspace.ansys.com\/knowledge\/"},{"@type":"WebPage","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/using-the-scade-python-apis-from-your-favorite-ide\/#webpage","url":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/using-the-scade-python-apis-from-your-favorite-ide\/","name":"Using the SCADE Python APIs from your favorite IDE | Ansys Knowledge","description":"Like most Ansys products, SCADE comes with a comprehensive Python API. It allows you to programmatically use SCADE to automate tasks (e.g. setting up a CI\/CD toolchain for your SCADE models). In this article, we'll explore how to set up your favorite Integrated Development Environment (IDE) to write and debug Python code interacting with SCADE.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/using-the-scade-python-apis-from-your-favorite-ide\/#breadcrumblist"},"datePublished":"2024-01-03T11:21:33+00:00","dateModified":"2026-09-30T10:11:01+00:00"},{"@type":"WebSite","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#website","url":"https:\/\/innovationspace.ansys.com\/knowledge\/","name":"Ansys Knowledge","description":"Ansys Innovation Space","inLanguage":"en-US","publisher":{"@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#organization"}}]},"og:locale":"en_US","og:site_name":"Ansys Knowledge | Ansys Innovation Space","og:type":"article","og:title":"Using the SCADE Python APIs from your favorite IDE | Ansys Knowledge","og:description":"Like most Ansys products, SCADE comes with a comprehensive Python API. It allows you to programmatically use SCADE to automate tasks (e.g. setting up a CI\/CD toolchain for your SCADE models). In this article, we'll explore how to set up your favorite Integrated Development Environment (IDE) to write and debug Python code interacting with SCADE.","og:url":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/using-the-scade-python-apis-from-your-favorite-ide\/","article:published_time":"2024-01-03T11:21:33+00:00","article:modified_time":"2026-09-30T10:11:01+00:00","twitter:card":"summary_large_image","twitter:title":"Using the SCADE Python APIs from your favorite IDE | Ansys Knowledge","twitter:description":"Like most Ansys products, SCADE comes with a comprehensive Python API. It allows you to programmatically use SCADE to automate tasks (e.g. setting up a CI\/CD toolchain for your SCADE models). In this article, we'll explore how to set up your favorite Integrated Development Environment (IDE) to write and debug Python code interacting with SCADE."},"aioseo_meta_data":{"post_id":"180947","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2025-10-18 03:07:34","updated":"2026-09-30 10:49:07","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/knowledge\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/\" title=\"Topics\">Topics<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/api\/\" title=\"api\">api<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tUsing the SCADE Python APIs from your favorite IDE\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/innovationspace.ansys.com\/knowledge"},{"label":"Topics","link":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/"},{"label":"api","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/api\/"},{"label":"Using the SCADE Python APIs from your favorite IDE","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/using-the-scade-python-apis-from-your-favorite-ide\/"}],"acf":[],"custom_fields":[{"0":{"_wp_page_template":["default"],"_btv_view_count":["8548"],"_bbp_likes_count":["17"],"_bbp_engagement":[""],"_bbp_reply_count":[""],"_bbp_reply_count_hidden":[""],"_bbp_last_active_time":["1\/3\/2024 20:20"],"_bbp_last_active_id":[""],"_bbp_last_reply_id":[""],"_bbp_author_ip":["23.56.168.181"],"_bbp_topic_id":["183561"],"_bbp_forum_id":["27825"],"_bbp_voice_count":[""],"_wp_desired_post_slug":[""],"_edit_lock":["1791361086:1769"],"_edit_last":["1769"],"filter_by_optics_product":["Lumerical"],"_filter_by_optics_product":["field_64fb192ba3121"],"application_name":[""],"_application_name":["field_64a80903c8e15"],"family":[""],"_family":["field_64a809229a857"],"siebel_km_number":[""],"_siebel_km_number":["field_63ecbffce60db"],"salesforce_km_number":[""],"_salesforce_km_number":["field_63ecc018e60dc"],"km_published_date":[""],"_km_published_date":["field_64c77704499dd"],"product_version":[""],"_product_version":["field_64c776cb4fd2e"],"_yoast_wpseo_content_score":["90"],"_yoast_wpseo_estimated-reading-time-minutes":["7"],"_yoast_wpseo_wordproof_timestamp":[""]},"test":"solution"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/180947","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":18,"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/180947\/revisions"}],"predecessor-version":[{"id":199640,"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/180947\/revisions\/199640"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/media?parent=180947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}