Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Can't apply math operations in Python Labels

$
0
0
Hello,

I'm trying to label point features with numeric values divided by 1000. No matter how I try to do this in Python, it will not work. I tried using 'int' and 'float' on the numeric field in question. no labels ever print unless I leave the value alone. Does anyone have any ideas on how to work around this. btw works fine in vb or jscript.

def FindLabel ( [sys_loc_code], [end_depth], [cas_rn], [result_numeric], [interpreted_qualifiers]):
UG = float([result_numeric]) /1000
if [cas_rn] == 'PCBH-T':
return UG + [sys_loc_code]

Viewing all articles
Browse latest Browse all 2485

Latest Images

Trending Articles



Latest Images