Hi,
It's for an Interactor PythonPart and I'm using the attribute field for "Designation" (@507@).
in my case, the user will have to choose between differents objects to build and the designation will depend of it (choice by StringComboBox).
As I said, I completed my python file for get it works with add_attribute and I wondered if the attribute's value can be dynamic in the pyp file.
For :
<Value>-Double * 1000 if Double < 1000 else -Double</Value>
it's an example of dynamic value found in AllControls.pyp :
<Parameter>
<Name>Length</Name>
<Text>Length</Text>
<Value>4711</Value>
<ValueType>Length</ValueType>
<MinValue>-Double * 1000 if Double < 1000 else -Double</MinValue>
<MaxValue>
if Double < 1000:
return 2 * Double * 1000
else:
return 2 * Double
</MaxValue>
<BackgroundColor>
if Double < 1000:
return (0, 255, 0)
return (0, 0, 255)
</BackgroundColor>
</Parameter>
Best
Edit:
Formula in pyp file is a great tool too and it's very flexible