ansys.scade.apitools.create.scade.add_imported_to_project#
- ansys.scade.apitools.create.scade.add_imported_to_project(project: scade.model.project.stdproject.Project, element: scade.model.suite.NamedType | scade.model.suite.Operator, path: str, folder: scade.model.project.stdproject.Folder = None, default: bool = True) scade.model.project.stdproject.FileRef #
Add an imported source file, associated with the SCADE imported element, to the project.
The file is added if and only if it is not already present. If the file is present, the
folder
anddefault
parameters are ignored.When the
folder
parameter is notNone
, the file is added to the folder specified.When the
default
parameter isTrue
, the file is added to either the “External Code” or “External Type Definitions” folder, depending on the nature of the element.Otherwise, the file is added to the project as a root element.
- Parameters:
- project
std.Project
Project to modify.
- element
Union
[suite.NamedType
,suite.Operator
] Imported element.
- path
str
Path of the file to add to the project.
- folder
std.Folder
Parent folder of the file to add to the project.
- defaultbool, default:
True
Whether to add the file is added to the default folder for SCADE Simulation files, according to the element.
- project
- Returns:
std.FileRef