Skip to content

AssociationService

Canonical path: NemAll_Python_BaseElements.AssociationService

Implementation of the association service

Methods:

AssociateElementsWithPythonPart staticmethod

AssociateElementsWithPythonPart(
    doc: DocumentAdapter,
    elementUUIDs: list,
    pythonPartUUID: GUID,
    connectAsChild: bool = False,
)

Associate the elements with the PythonPart

Parameters:

  • doc (DocumentAdapter) –

    Document

  • elementUUIDs (list) –

    List with the element UUIDs as string

  • pythonPartUUID (GUID) –

    UUID of the PythonPart

  • connectAsChild (bool, default: False ) –

    Connect the PythonPart as child to the first elemen

DeletePythonPartAssociation staticmethod

DeletePythonPartAssociation(doc: DocumentAdapter, pythonPartUUID: GUID)

Delete the PythonPart association

Parameters:

ExecuteUpdate staticmethod

ExecuteUpdate(doc: DocumentAdapter)

Execute the association update

Parameters:

GetObservedElements staticmethod

GetObservedElements(
    doc: DocumentAdapter, dependentElementUUID: GUID
) -> BaseElementAdapterList

Get the observed elements

Parameters:

  • doc (DocumentAdapter) –

    Document

  • dependentElementUUID (GUID) –

    UUID of the dependent element

Returns:

RemoveElementsFromPythonPartAssociation staticmethod

RemoveElementsFromPythonPartAssociation(
    doc: DocumentAdapter, elementUUIDs: list, pythonPartUUID: GUID
)

Remove the elements from the PythonPart association

Parameters:

  • doc (DocumentAdapter) –

    Document

  • elementUUIDs (list) –

    List with the element UUIDs as string

  • pythonPartUUID (GUID) –

    UUID of the PythonPart

Placeholder