create_constant(owner, name, type_, value, path=None, visibility=VK.PUBLIC)#

Create a constant.

A constant has a name, type, and value.

Parameters:
ownersuite.Package

Owner of the constant, 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.

valueEX

Expression tree defining the value.

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, theconstant is stored in the model’s default file.

visibilityVK

Accessibility of the constant.

Returns:
suite.Constant