Skip to Content

Set Literal Attribute

Quick Facts

PropertyValue
ClassOlpCorePythonSetLiteralAttribute
Modulecenpyolpcore.OlpCorePythonSetLiteralAttribute
Packagecenpyolpcore
ReleaseR2025.2.4
Methods8
Inherits fromOlpCorePythonLiteralAttribute

Inheritance

Method Index

MethodReturnsSummary
SetOlpPropertySets the AttributeProperties of this attribute
SetReadOnlySets whether or not this attribute is globally read-only
SetNameSets the name of the attribute
SetGroupNameSets the group name
SetValueSets the current value.
SetValuesSets the current values
SetIndexSets the index.
SetValueUnitTypeSets the type of unit the value is given in.

Mutation Methods

SetOlpProperty

def SetOlpProperty(olpProperty: int)

Sets the AttributeProperties of this attribute

Parameters:

NameTypeDescription
olpPropertyintAttributeProperties to be set

SetReadOnly

def SetReadOnly(isReadOnly: bool)

Sets whether or not this attribute is globally read-only

Parameters:

NameTypeDescription
isReadOnlyboolTrue if the must be attribute is read-only, False otherwise

SetName

def SetName(name: str)

Sets the name of the attribute

Parameters:

NameTypeDescription
namestrthe name of the attribute

SetGroupName

def SetGroupName(name: str)

Sets the group name

Parameters:

NameTypeDescription
namestrthe name of the attribute group

SetValue

def SetValue(value: str)

Sets the current value. This will adapt the index accordingly.

Parameters:

NameTypeDescription
valuestrthe new value to set

SetValues

def SetValues(values: list)

Sets the current values

Parameters:

NameTypeDescription
valueslist

SetIndex

def SetIndex(index: int)

Sets the index. This will adapt the value accordingly.

Parameters:

NameTypeDescription
indexint

SetValueUnitType

def SetValueUnitType(valueUnitType: int)

Sets the type of unit the value is given in. See AttributeValueUnitType for details and default units

Parameters:

NameTypeDescription
valueUnitTypeintnew value unit type to be used

Version Notes

This class is documented as of release R2025.2.4.

Was this page helpful?