Skip to Content

Attrib Creator

Quick Facts

PropertyValue
ClassCENPyOlpAttribCreator
Modulecenpylib.CENPyOlpAttribCreator
Packagecenpylib
ReleaseR2025.2.4
Methods9

Quick Start

# Boilerplate Example attribCreator = ... # obtained from the runtime context result = attribCreator.GetSystemAttribCreator()

Method Index

MethodReturnsSummary
AddIntegerCENPyOlpAttributeIntCreate a new integer attribute.
AddDoubleCENPyOlpAttributeDoubleCreate a new double attribute.
AddStringCENPyOlpAttributeStringCreate a new string attribute.
AddBoolCENPyOlpAttributeBoolCreate a new bool attribute.
AddEnumCENPyOlpAttributeEnumCreate a new enum attribute.
AddTableCENPyOlpAttributeTableCreate a new table attribute.
GetSystemAttribCreatorCENPyOlpSystemAttribCreatorGet an operator which creates system attributes.
AddAttribGroupCENPyOlpAttribGroupCreate a new attribute group.
GetAllAttribGroupslist[CENPyOlpAttribGroup]Gets all attribute groups.

Query Methods

GetSystemAttribCreator

def GetSystemAttribCreator() -> CENPyOlpSystemAttribCreator

Get 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) -> CENPyOlpAttributeInt

Create a new integer attribute.

Parameters:

NameTypeDescription
namestrname of the attribute
valintdefault value of the attribute
minintminimum value of the attribute
maxintmaximum value of the attribute
olpAttribTypeintattribute properties
nlsstrNLS 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) -> CENPyOlpAttributeDouble

Create a new double attribute.

Parameters:

NameTypeDescription
namestrname of the attribute
valfloatdefault value of the attribute
minfloatminimum value of the attribute
maxfloatmaximum value of the attribute
stepfloatstep size for the arrow keys
olpAttribTypeintattribute properties
attribTypeintattribute properties
nlsstrNLS string

Returns: CENPyOlpAttributeDouble — Created attribute object.

AddString

def AddString(name: str, val: str, olpAttribType: int, nls: str) -> CENPyOlpAttributeString

Create a new string attribute.

Parameters:

NameTypeDescription
namestrname of the attribute
valstrdefault value of the attribute
olpAttribTypeintattribute properties
nlsstrNLS string

Returns: CENPyOlpAttributeString — Created attribute object.

AddBool

def AddBool(name: str, val: bool, olpAttribType: int, nls: str) -> CENPyOlpAttributeBool

Create a new bool attribute.

Parameters:

NameTypeDescription
namestrname of the attribute
valbooldefault value of the attribute
olpAttribTypeintattribute properties
nlsstrNLS string

Returns: CENPyOlpAttributeBool — Created attribute object.

AddEnum

def AddEnum(name: str, literals: object, value: str, olpAttribType: int, nls: str) -> CENPyOlpAttributeEnum

Create a new enum attribute.

Parameters:

NameTypeDescription
namestrname of the attribute
literalsAnylist of given items
valuestrdefault value of the attribute
olpAttribTypeintattribute properties
nlsstrNLS string

Returns: CENPyOlpAttributeEnum — Created attribute object.

AddTable

def AddTable(name: str, olpAttribType: int, nls: str) -> CENPyOlpAttributeTable

Create a new table attribute.

Parameters:

NameTypeDescription
namestrname of the attribute
olpAttribTypeintattribute properties
nlsstrNLS string

Returns: CENPyOlpAttributeTable — Created attribute object.

AddAttribGroup

def AddAttribGroup(name: str) -> CENPyOlpAttribGroup

Create a new attribute group.

Parameters:

NameTypeDescription
namestrname of the group which will be added.

Returns: CENPyOlpAttribGroup — Created group object.

Version Notes

This class is documented as of release R2025.2.4.

Was this page helpful?