Skip to content

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 staticmethod

ChangeAttribute(
    attributeNumber: int,
    newValue: object,
    elements: BaseElementAdapterList,
    setUndefAttrib: bool = False,
    setDeleteAttrib: bool = False,
) -> BaseElementAdapterList

Change an attribute

Parameters:

  • attributeNumber (int) –

    Attribute number

  • newValue (object) –

    New value

  • elements (BaseElementAdapterList) –

    Elements

  • setUndefAttrib (bool, default: False ) –

    Set Attribute undefined (optional)

  • setDeleteAttrib (bool, default: False ) –

    Delete Attribute (optional)

Returns:

ChangeAttributes staticmethod

ChangeAttributes(
    attributeDataList: list,
    elements: BaseElementAdapterList,
    setUndefAttrib: bool = False,
    setDeleteAttrib: bool = False,
) -> BaseElementAdapterList

Change an attribute

Parameters:

  • attributeDataList (list) –

    List with the attribute data as tuple(number, value)

  • elements (BaseElementAdapterList) –

    Elements as BaseElementAdapterList

  • setUndefAttrib (bool, default: False ) –

    Set Attribute undefined (optional)

  • setDeleteAttrib (bool, default: False ) –

    Delete Attribute (optional)

Returns:

GetAttributes staticmethod

GetAttributes(
    ele: BaseElementAdapter, readState: eAttibuteReadState = ReadAll
) -> list

Get the attributes from an element

Parameters:

Returns:

  • list

    Attributes

Placeholder