0

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?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Jan 18, 2017 at 18:05

1 Answer 1

2

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.

answered Jan 18, 2017 at 18:38
2
  • Yes, the calculations in Step 1 are outputting the correct (non-zero)acreage values. Commented Jan 18, 2017 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. Commented Jan 18, 2017 at 20:59

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.