Skip to main content

Hi,

I have a script that does an area calculation using arcpy, the two calculated areas are output in the log, I need each one of them to be output as an attribute, how to do this? I'm new to python at FME.

 

image 

log:

 

imageThe output, it doesn't help me at all.

 

image 

Thank you for your help

 

 

Any particular reason for using arcpy rather than the AreaCalculator transformer?

Other than that, you can add the following on line 124:

feature.setAttribute('total_xyz', total_xyz)
feature.setAttribute('total_TAL', total_TAL)

I've substituted the red "blob" for xyz above. You'll need to also expose the new attributes in the PythonCaller settings.


Any particular reason for using arcpy rather than the AreaCalculator transformer?

Other than that, you can add the following on line 124:

feature.setAttribute('total_xyz', total_xyz)
feature.setAttribute('total_TAL', total_TAL)

I've substituted the red "blob" for xyz above. You'll need to also expose the new attributes in the PythonCaller settings.

Hi @david_r​ 

 

Helped a lot. Thank´s 

 

This script is huge, I don't want to change its structure but, I would prefer to use the Area Calculator.

 

Thank´s

 


Reply