-
-
April 1, 2024 at 1:20 pmSolutionParticipant
In this article, we’ll take a look at Ansys SCADE API Tools (GitHub link), designed to simplify usage of the SCADE Python APIs.
The vanilla SCADE Python API
Most Ansys products come packaged with Python APIs (as part of the PyAnsys initiative). These open-source libraries allow engineers to interact programmatically with Ansys products, integrating them into their workflows.
Ansys SCADE is no exception. Its Python API allows users to:
- Walk through SCADE models and modify them using code
- Access generated artefacts (mapping files, test results, model coverage…)
If you’re interested in using the SCADE Python API, we’ve already written an article on getting started with your favorite IDE.
Introducing
ansys-scade-apitools
We are pleased to announce the release of
ansys-scade-apitools
, a Python package that extends the standard SCADE Python API.Its goal is to make the SCADE API easier to use by adding a collection of high-level functions that accomplish complex operations without exposing low-level concepts to the user.
Key benefits are:
- Simplified configuration to run Python code from your preferred IDE.
- High-level, Pythonic APIs allow creating models, automatically handling intermediate elements and their consistency.
The package is structured into five modules:
create
: collection of functions for creating or updating SCADE models. This includes creating types, operators, interfaces and other constructs.expr
: collection of functions for accessing expressions. This covers walking through a model’s operators and expressions.info
: provides information on the current version of SCADE.prop
: collection of functions for the storage of settings and properties.query
: collection of queries about SCADE Suite types.
Some examples
The images below illustrate a couple of the numerous functions exposed by API Tools.
Example: accessing an If expression with a Python script (link)
Example: printing SCADE version properties with a Python script (link)The library has many more functions than illustrated in this short article. You may find them described in the Examples section of our online docs.
Ready to try it out?
If you’re interested in using Ansys SCADE API Tools, our online docs are a great starting point. The package is published on PyPI (Python Package Index) as ansys-scade-apitools.
If you wish to look under the hood and/or contribute, sources are available on the dedicated Ansys GitHub repository.
About the author
François Couadau (LinkedIn) is a Senior Product Manager at Ansys. He works on embedded HMI software aspects in the SCADE and Scade One products. His past experience includes distributed systems and telecommunications.
-
Introducing Ansys Electronics Desktop on Ansys Cloud
The Watch & Learn video article provides an overview of cloud computing from Electronics Desktop and details the product licenses and subscriptions to ANSYS Cloud Service that are...
How to Create a Reflector for a Center High-Mounted Stop Lamp (CHMSL)
This video article demonstrates how to create a reflector for a center high-mounted stop lamp. Optical Part design in Ansys SPEOS enables the design and validation of multiple...
Introducing the GEKO Turbulence Model in Ansys Fluent
The GEKO (GEneralized K-Omega) turbulence model offers a flexible, robust, general-purpose approach to RANS turbulence modeling. Introducing 2 videos: Part 1Â provides background information on the model and a...
Postprocessing on Ansys EnSight
This video demonstrates exporting data from Fluent in EnSight Case Gold format, and it reviews the basic postprocessing capabilities of EnSight.
- How to Verify a Model on Host with SCADE Test? (Part 4 of 6)
- Scade One – An Open Model-Based Ecosystem, Ready for MBSE
- Scade One – A Visual Coding Experience
- Scade One – Bridging the Gap between Model-Based Design and Traditional Programming
- Introduction to the SCADE Environment (Part 1 of 5)
- How to Generate Code with SCADE Display (Part 6 of 6)
- Using the SCADE Python APIs from your favorite IDE
- Interface Generic Types – Design a Median with ANSYS SCADE (Part 2 of 6)
- Scade One – Democratizing model-based development
- ANSYS SCADE – Map Iterator – Comparison Function: C and SCADE Methods Comparison (Part 4 of 4)
© 2024 Copyright ANSYS, Inc. All rights reserved.