dlr-gtlab / python-module

GTlab Module for embadding Python into GTlab
0 stars 0 forks source link

`setPropertyValue` does not work for ObjectLinkProperties and derived types #282

Closed rainman110 closed 4 months ago

rainman110 commented 5 months ago

In GitLab by @jensschmeink on May 29, 2024, 10:24

Summary

Object link properties can have the ability to also use classes herited from the given allowed classes. This feature is neglected in the decorator to set object link properties in the python module and leads to problems if it should be used

Which software is probably the cause of the error?

The functions setPropetyValue (there are two of them) in the GtpyDecorator seems to lead to the problem.

What is the current bug behavior?

Propeties might not be set. E.g the property allows GtdTurboComponent and has the subclass mode on. In python tasks the property cannot be set with a GtdTurbine but it should be possible.

What is the expected correct behavior?

The posibility to set the value as in the GUI

Steps to reproduce

See bug behaviour

Relevant logs and/or screenshots

"ERROR: GtdTurbine is not an allowed class type for the property Target Component! Allowed class types: GtdTurboComponent, GtdRotorBladeRow, GtdFan"

GTlab environment

(Add details to your GTlab environment. If the bug relates to a module, please also add the module and its version.)

rainman110 commented 5 months ago

In GitLab by @jensschmeink on May 29, 2024, 10:24

created branch 279-decorator-to-set-object-link-properties-has-problems-with-heritage to address this issue

rainman110 commented 5 months ago

mentioned in commit a15cb9774f957d8034330ac8b4b40dcad0bc02df