Tuesday, 27 March 2018

arcgis desktop - Use value of Field in Calculation in Modelbilder


In Modelbuilder I have set up a model, where in one step I do a "Calculate Field" like "round((!OID!-1- %MyField% /15)/452,1)+1" . For the calculation i use the value of %MyField%, which actually is an Value of a specific Field in the first Row of a Table. I tried to retrieve is with "Get Field Value" - this works. But how do I ensure, that I have the value retrievet at the moment when I want to "Calculate Field"? Of cource I make an "Precondition" connection, but if "MyField" is 0 (Zero), the precondition says False, so the Calculate Field is not executed. To explain more: I iterate through features (A) in feature class. In the iteration model i create an fishnet (new feature class (B)) inside the feature. Then i add a field to the new feature class (B).Now i need to calculate this field using the formula mentioned above. In the formula i need to use a value from a field of the feature (A). Is there a way? (I use Arcgis 10.2)




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...