ElementsAttributeService
Canonical path: NemAll_Python_BaseElements.ElementsAttributeService
Service for processing attributes of existing model elements. The service provides methods to e.g. read or modify attribute values.
Methods:
-
ChangeAttribute
–Change an attribute
-
ChangeAttributes
–Change an attribute
-
GetAttributes
–Get the attributes from an element
ChangeAttribute
staticmethod
ChangeAttribute(
attributeNumber: int, newValue: object, elements: BaseElementAdapterList
) -> BaseElementAdapterList
Change an attribute
Parameters:
-
attributeNumber
(int
) –Attribute number
-
newValue
(object
) –New value
-
elements
(BaseElementAdapterList
) –Elements
Returns:
-
BaseElementAdapterList
–Adapted elements
ChangeAttributes
staticmethod
ChangeAttributes(
attributeDataList: list, elements: BaseElementAdapterList
) -> BaseElementAdapterList
Change an attribute
Parameters:
-
attributeDataList
(list
) –List with the attribute data as tuple(number, value)
-
elements
(BaseElementAdapterList
) –Elements as BaseElementAdapterList
Returns:
-
BaseElementAdapterList
–Modified elements
GetAttributes
staticmethod
GetAttributes(
ele: BaseElementAdapter, readState: eAttibuteReadState = ReadAll
) -> list
Get the attributes from an element
Parameters:
-
ele
(BaseElementAdapter
) –Element adapter
-
readState
(eAttibuteReadState
, default:ReadAll
) –What attributes to read
Returns:
-
list
–Attributes
Placeholder