Modelbuilder in ArcGIS 10

244
1
06-17-2014 04:30 AM
wusirui
New Contributor
Hi all
I got a problem when I want to make a modelbulider in ArcGIS 10.

The thing is that: I have a polyline shp file with length field in attribute table (havent been calculated so they are value 0 now). Now I have no idea how can I make a function to calculate geometry in modelbuilder(I knew how to calculate manually by just right-clicking field and choose calculate geometry). I tried to serarch Calculate geometry in toolbox but there was anything.

I know I can also do this manually but my project is quite big. In this case, it would be a good idea to create complete model to process everything.

Could someone help me to solve? or if there is any other way works well.

I would be much appreciate if anyone can help me.
0 Kudos
1 Reply
RichardFairhurst
MVP Honored Contributor
Hi all
I got a problem when I want to make a modelbulider in ArcGIS 10.

The thing is that: I have a polyline shp file with length field in attribute table (havent been calculated so they are value 0 now). Now I have no idea how can I make a function to calculate geometry in modelbuilder(I knew how to calculate manually by just right-clicking field and choose calculate geometry). I tried to serarch Calculate geometry in toolbox but there was anything.

I know I can also do this manually but my project is quite big. In this case, it would be a good idea to create complete model to process everything.

Could someone help me to solve? or if there is any other way works well.

I would be much appreciate if anyone can help me.


You have to use python in the field calculator.  The basic operations are listed here under the Geometry Unit Conversion section.  The basic syntax for filling in length from lines is:

!shape.length!

You can convert units with expressions like:

!shape.length@yards!
0 Kudos