Hello,
The problem is, I have a shutdown python script but I need the value of an output parameter, there's any way to know the value of that parameter "Division" with python?
Hello,
The problem is, I have a shutdown python script but I need the value of an output parameter, there's any way to know the value of that parameter "Division" with python?
Not quite sure I understand... Do you need to acces the value of attribute "Division" from e.g. a PythonCaller? If so:
my_division_value = feature.getAttribute('Division')
Not quite sure I understand... Do you need to acces the value of attribute "Division" from e.g. a PythonCaller? If so:
my_division_value = feature.getAttribute('Division')
Thanks for the supplemental info. So you already know how to write a file with the translation status (see here).
The second part is how to "transfer" the value of a feature attribute into the shutdown script. We can use a Python global variable for that. Insert a PythonCaller just before the writer:
def GetDivisionValue(feature):
global MY_GLOBAL_DIVISION_VALUE
MY_GLOBAL_DIVISION_VALUE = feature.getAttribute('Division')
Then in the shutdown script, you can retrieve the global variable like this:
global MY_GLOBAL_DIVISION_VALUE
print "The Division value was:", MY_GLOBAL_DIVISION_VALUE
As it is, I assume that only a single feature will be written to Voting...-something writer.