labs4capella / python4capella

Python for Capella
Eclipse Public License 2.0
52 stars 10 forks source link

Suggestion: Add Get PV Group Name Method. #182

Closed TomWebster98 closed 2 weeks ago

TomWebster98 commented 1 year ago

To allow for finding names of PV groups Add the following as a method to the PVMT class in the PVMT.py API

This is useful for extracting property values and retaining their group names, particularly when handling formatting in the Excel exports of this information.

@staticmethod def get_p_v_groups(elem: CapellaElement) -> List[str]: """ Parameters: elem: CapellaElement Returns: String[*] status: OK """

: :type elem: CapellaElement

    #res = []
    for group in elem.get_java_object().getOwnedPropertyValueGroups():
        return group.getName()