ScadeOne app#
The ScadeOne “app” is the Python class that allows you to interact with Scade One projects.
The ansys.scadeone.core module must be referenced by scripts using PyScadeOne. It exposes the ScadeOne class representing a Scade One instance.
An instance of the ScadeOne class gives access to project loading and model-related activities as shown in the next figure:
ScadeOne class hierarchy#
- class ansys.scadeone.core.ScadeOne(install_dir: str | Path | None = None)#
Bases:
IScadeOneScade One API.
- load_project(storage: ProjectStorage | str | Path) Project | None#
Load a Scade One project.
- Parameters:
- storage
Union[ProjectStorage,str,Path] Storage containing project data.
- storage
- Returns:
- Project|None
Project object, or None if file does not exist.
- new_project(storage: str | Path) Project | None#
Create a new project.
- Parameters:
- storage
Union[str,Path] Project location.
- storage
- Returns:
ProjectProject object.
- subst_in_path(path: str) str#
Substitute $(SCADE_ONE_LIBRARIES_DIR) in path.
if
ScadeOne.install_diris None, no change is made.
- property install_dir: Path | None#
Installation directory as given when creating the ScadeOne instance.