Using ArcGIS Desktop 10.3.1, I have two simple polygon shapefiles, each with just a single feature.

I'm new at ModelBuilder, and have 2 tasks:

  1. calculate the acreage within each of the two shapefiles, and then
  2. calculate their relative size; that is, simply divide one shapefile acreage by the other.

Here's a screenshot of my model:

enter image description here

I successfully completed step 1 by using the Python expression !shape.area@acres! within each Calculate Field tool. The correct acreage is added to the just-added field in each shapefile.

But the model returns the syntax error 000539 at step 2, which confuses me. The ESRI documentation says that the output from each of my two Calculate Field tools in Step 1 is a variable, represented by the name of the green output oval. So I would expect that using this expression in the Calculate Value tool would correctly give me the relative acreage: %pss_out% / %wetlandA_out%

Here's a screenshot of my Calculate Value tool:

enter image description here

Once I get this problem solved, I plan to populate a separate table field with the output from the Calculate Value tool.

In summary, how do I divide the output from one of the two Calculate Field tools in Step 1 by the other?


Put in an extra step behind from WetlandA_out and pss_out in Step 1) Right Click in model builder and GET FIELD VALUES that way you aren't dividing outputs but just ACRES.

  • Yes, the calculations in Step 1 are outputting the correct (non-zero)acreage values. – user45726 Jan 18 '17 at 18:46
  • For those who might stumble upon this thread, @j.stanfield is correct. Further, the Get Field Values tool is only accessible (AFAIK) from the Model Builder edit window, via Insert > Model Only tools > Get Field Values. I inserted this tool after each Calculate Field tool, prior to the Calculate Values tool. – user45726 Jan 18 '17 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.