ansys.scade.apitools.create.declaration.create_imported_constant#
- ansys.scade.apitools.create.declaration.create_imported_constant(owner: scade.model.suite.Package, name: str, type_: ansys.scade.apitools.create.type.TX, path: pathlib.Path | None = None, visibility: VK = VK.PUBLIC)#
Create an imported constant.
The constant has a name and a type.
Parameters#
- ownersuite.Package
Owner of the type, which is either the model itself or a package.
- namestr
Name of the constant.
- type_TX
Definition of the type expressed as a type tree.
- pathPath, default: None
Path of the file for storing the constant. This parameter is ignored if the owner is a package. When the path is
None
and owner is the model, the constant is stored in the model’s default file.- visibilityVK
Accessibility of the constant.
Returns#
suite.NamedType