Retrieving an EnumerationPropertyValues's Value

Hi All,

Today’s challenge for me is Enumeration Property Values.

Using the interpreter and “aql:self.value” shows the assigned ‘value’ of the EnumerationPropertyValue however when I attempt to print the value, either using the “get_value()” function or “PV.get_java_object().getValue()”, the console displays ‘None’.

Furthermore, if I try to export the value to excel, I see an error in the console pointing toward the functions above (error below).

“ValueError: Cannot convert JavaObject id=o757 to Excel”

Any alternative methods to print/ export the enumeration property value (as I have all other types working fine)?

Thank you!

We have made some fixes in PVMT API in the last release. If you are not using the last version of Python4Capella, you can check the current code for PVMT.get_p_v_value(). If needed you can remplace our implementation with the last one.

And you should call something like:

PVMT.get_p_v_value(capellaElement, "SomeProperty")