- create_constant(owner, name, type_, value, path=None, visibility=VK.PUBLIC)#
Create a constant.
A constant has a name, type, and value.
- Parameters:
- owner
suite.Package
Owner of the constant, which is either the model itself or a package.
- name
str
Name of the constant.
- type_
TX
Definition of the type expressed as a type tree.
- value
EX
Expression tree defining the value.
- path
Path
, 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, theconstant is stored in the modelβs default file.- visibility
VK
Accessibility of the constant.
- owner
- Returns:
suite.Constant