Property owned by component

Hello

I’m still continuing to check my model using excel tables exported by python scripts.
At the moment, I’m trying to manage the converage of context variant by system variants:
The route is context variant is supported by SF variant and SF variant is supported by system variant.
When the attribute may be not explicit: system units are different, but we still can describe them as a generic model with a property (variable). Then I create a property applying the PVG describing the “input” variant" that belongs to the system.
The point is I can’t find any function to pick up properties owned by system, and I can’t either find the container of the property…
My current plan is now arrange the tree (bring as much as possible at first level, without typing by primary class) to ease a csv export…

Thanks for any better idea

Thierry Poupon

To access property value, you need to import PVMT:

# include needed for the PVMT API
include('workspace://Python4Capella/simplified_api/pvmt.py')
if False:
    from simplified_api.pvmt import *

Then you should be able to use static methods from PVMT, for instance:

PVMT.get_p_v_value(mySystem, "SomeProperty")

To get the container of an EObject in the Python API, you can use:

EObject.get_container()

For instance:

myCapellaElement.get_container()

Note that if the type of the container is not present in the simplified Python API this method will return None.