AssociationService
Canonical path: NemAll_Python_BaseElements.AssociationService
Implementation of the association service
Methods:
-
AssociateElementsWithPythonPart–Associate the elements with the PythonPart
-
DeletePythonPartAssociation–Delete the PythonPart association
-
ExecuteUpdate–Execute the association update
-
GetObservedElements–Get the observed elements
-
RemoveElementsFromPythonPartAssociation–Remove the elements from the PythonPart association
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:
-
doc(DocumentAdapter) –Document
-
pythonPartUUID(GUID) –UUID of the PythonPart
ExecuteUpdate
staticmethod
ExecuteUpdate(doc: DocumentAdapter)
GetObservedElements
staticmethod
GetObservedElements(
doc: DocumentAdapter, dependentElementUUID: GUID
) -> BaseElementAdapterList
Get the observed elements
Parameters:
-
doc(DocumentAdapter) –Document
-
dependentElementUUID(GUID) –UUID of the dependent element
Returns:
-
BaseElementAdapterList–Observed elements
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