Python Script to Calculate Length in Field Calculator in Model Builder

3607
2
Jump to solution
08-10-2017 12:24 PM
BrendanBlee
New Contributor II

I need to figure out what python script to input in the field calculator tool to calculate a length in miles of an empty line field in model builder. I know that this is part of it !shape.length@miles! but I don't know what to put before or after it in the script to make it work. Any help would be greatly appreciated. 

Best,


Brendan 

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

make your life simpler and use the Add Geometry Attributes tool and preset what you want for the tool outputs and units... just put it in your model as appropriate

View solution in original post

2 Replies
DanPatterson_Retired
MVP Emeritus

make your life simpler and use the Add Geometry Attributes tool and preset what you want for the tool outputs and units... just put it in your model as appropriate

BrendanBlee
New Contributor II

Thanks for the quick help Dan! 

0 Kudos