Support Forum

[Frage] [PythonParts] Interactor, modify_element_property and plane reference

Schlagworte:
  • Interactor
  • PlaneReference

Hi,

Working on an interactor script containing planes references, the function "modify_element_property" doesn't detect the modification of the plane reference in the palette with

in name == "BottomPlane"

(no problem with the other parameters)

Here in pyp file :

<Parameter>
<Name>BottomPlane</Name>
<Value></Value>
<ValueType>PlaneReferences</ValueType>
<ValueDialog>BottomPlaneReferences</ValueDialog>
<Visible>|BottomPlane.AbsBottomElevation:False</Visible>
</Parameter>

What I'm doing wrong ?

Best
Christophe

Hilfreichste Antwort anzeigen Hilfreichste Antwort verbergen

Hi Christophe,

in general, the parameters that are controlled by a button opening another window on the property palette, are triggering the modify_element_property event, but maybe not exactly in the way you would expect it or as it is the case with other parameter values.

Please use the example Events. Add a parameter of your interest to .pyp file and try to modify it. Observe, what's printed in the trace.

In case of a Plane reference parameter, the parameter name passed to the event is different: BottomPlane___DialogButton___. I think this is where your routine is failing. It's expecting the name BottomPlane. Go with

if "BottomPlane" in name

Best,
Bart

Hi Christophe,

in general, the parameters that are controlled by a button opening another window on the property palette, are triggering the modify_element_property event, but maybe not exactly in the way you would expect it or as it is the case with other parameter values.

Please use the example Events. Add a parameter of your interest to .pyp file and try to modify it. Observe, what's printed in the trace.

In case of a Plane reference parameter, the parameter name passed to the event is different: BottomPlane___DialogButton___. I think this is where your routine is failing. It's expecting the name BottomPlane. Go with

if "BottomPlane" in name

Best,
Bart