Attrib Creator
Quick Facts
| Property | Value |
|---|---|
| Class | CENPyOlpAttribCreator |
| Module | cenpylib.CENPyOlpAttribCreator |
| Package | cenpylib |
| Release | R2025.2.4 |
| Methods | 9 |
Quick Start
# Boilerplate Example
attribCreator = ... # obtained from the runtime context
result = attribCreator.GetSystemAttribCreator()Method Index
| Method | Returns | Summary |
|---|---|---|
AddInteger | CENPyOlpAttributeInt | Create a new integer attribute. |
AddDouble | CENPyOlpAttributeDouble | Create a new double attribute. |
AddString | CENPyOlpAttributeString | Create a new string attribute. |
AddBool | CENPyOlpAttributeBool | Create a new bool attribute. |
AddEnum | CENPyOlpAttributeEnum | Create a new enum attribute. |
AddTable | CENPyOlpAttributeTable | Create a new table attribute. |
GetSystemAttribCreator | CENPyOlpSystemAttribCreator | Get an operator which creates system attributes. |
AddAttribGroup | CENPyOlpAttribGroup | Create a new attribute group. |
GetAllAttribGroups | list[CENPyOlpAttribGroup] | Gets all attribute groups. |
Query Methods
GetSystemAttribCreator
def GetSystemAttribCreator() -> CENPyOlpSystemAttribCreatorGet an operator which creates system attributes.
Returns: CENPyOlpSystemAttribCreator — System attribute creator object.
GetAllAttribGroups
def GetAllAttribGroups() -> list[CENPyOlpAttribGroup]Gets all attribute groups.
Returns: list[CENPyOlpAttribGroup] — List of CENPyOlpAttribGroup objects, found attribute groups.
Mutation Methods
AddInteger
def AddInteger(name: str, val: int, min: int, max: int, olpAttribType: int, nls: str) -> CENPyOlpAttributeIntCreate a new integer attribute.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | name of the attribute |
val | int | default value of the attribute |
min | int | minimum value of the attribute |
max | int | maximum value of the attribute |
olpAttribType | int | attribute properties |
nls | str | NLS string |
Returns: CENPyOlpAttributeInt — Created attribute object.
AddDouble
def AddDouble(name: str, val: float, min: float, max: float, step: float, olpAttribType: int, attribType: int, nls: str) -> CENPyOlpAttributeDoubleCreate a new double attribute.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | name of the attribute |
val | float | default value of the attribute |
min | float | minimum value of the attribute |
max | float | maximum value of the attribute |
step | float | step size for the arrow keys |
olpAttribType | int | attribute properties |
attribType | int | attribute properties |
nls | str | NLS string |
Returns: CENPyOlpAttributeDouble — Created attribute object.
AddString
def AddString(name: str, val: str, olpAttribType: int, nls: str) -> CENPyOlpAttributeStringCreate a new string attribute.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | name of the attribute |
val | str | default value of the attribute |
olpAttribType | int | attribute properties |
nls | str | NLS string |
Returns: CENPyOlpAttributeString — Created attribute object.
AddBool
def AddBool(name: str, val: bool, olpAttribType: int, nls: str) -> CENPyOlpAttributeBoolCreate a new bool attribute.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | name of the attribute |
val | bool | default value of the attribute |
olpAttribType | int | attribute properties |
nls | str | NLS string |
Returns: CENPyOlpAttributeBool — Created attribute object.
AddEnum
def AddEnum(name: str, literals: object, value: str, olpAttribType: int, nls: str) -> CENPyOlpAttributeEnumCreate a new enum attribute.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | name of the attribute |
literals | Any | list of given items |
value | str | default value of the attribute |
olpAttribType | int | attribute properties |
nls | str | NLS string |
Returns: CENPyOlpAttributeEnum — Created attribute object.
AddTable
def AddTable(name: str, olpAttribType: int, nls: str) -> CENPyOlpAttributeTableCreate a new table attribute.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | name of the attribute |
olpAttribType | int | attribute properties |
nls | str | NLS string |
Returns: CENPyOlpAttributeTable — Created attribute object.
AddAttribGroup
def AddAttribGroup(name: str) -> CENPyOlpAttribGroupCreate a new attribute group.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | name of the group which will be added. |
Returns: CENPyOlpAttribGroup — Created group object.
Related Types
- Attribute Int
- Attribute Double
- Attribute String
- Attribute Bool
- Attribute Enum
- Attribute Table
- System Attrib Creator
- Attrib Group
Version Notes
This class is documented as of release R2025.2.4.