I am working with the ModelBuilder tool in ArcMap. I have created a simple model that takes the Strip Map Index Features as an input. I have added fields to the model to produce more fields in the attribute table. When I run my model, it works as the original Strip Map Index Features tool should work, however, in the attributes table, I see my fields that I added, but they are not being populated / calculated.
I am not sure how to calculate / populate these fields?
I have searched around the net for solutions but am not getting too may concrete answers as I am still pretty new to using ModelBuilder.
-
1Can you be a bit more specific - what are you trying to calculate in the fields?Cindy Jayakumar– Cindy Jayakumar2013年11月19日 05:01:31 +00:00Commented Nov 19, 2013 at 5:01
-
1can you add an image of the model structureuser21053– user210532013年11月19日 11:33:18 +00:00Commented Nov 19, 2013 at 11:33
-
1Can you not just add a CalculateField tool to the model and calculate the field?dklassen– dklassen2013年11月19日 19:15:36 +00:00Commented Nov 19, 2013 at 19:15
-
@arabella The Strip Map Index Features tool already generates some of these attributes in the table (Angle, PageNumber), so it would just be a matter of assigning those same values to the attribute fields that I've created (i.e., SMAP_ANGLE would get the values in Angle and SMAP_NUM would get the values in PageNumber).THe next case would be that SMAP_SCALE and SMAP_NAME would be populated from the inpute values. No major calculations for these attribute fields to be populated. I'm just not sure how to populate these fields that I've created. I've used the 'Add Field' tools.user1898629– user18986292013年11月20日 15:04:05 +00:00Commented Nov 20, 2013 at 15:04
-
2We encourage self answering! A good answer is a good answer regardless of who is talking. Please add your solution using the answer section below (and then tick the check mark to acknowledge it as being the solution that worked for you).matt wilkie– matt wilkie2014年02月06日 21:14:23 +00:00Commented Feb 6, 2014 at 21:14
3 Answers 3
I was using ModelBuilder to create a tool for arcmap. I was basing my tool off of the Strip Map Index Features tool in ArcMap. I wanted to add extra fields to the attribute table. When my tool ran, I would look in the attribute table and saw that the fields were there, however, they weren't being populated with any values.
In my model, I had added the 'Add Field' tools but I hadn't added any 'Calculate Field' tools. Once I attached the 'Calculate Field' tools to my 'Add Field' tools, I was then able to open (double-click) the 'Calculate Field' tool to enter in a formula/expression/function. This helped add values to the fields in my attribute table.
This might be a solution for you!
http://resources.arcgis.com/en/help/main/10.1/index.html#//004000000004000000
I am not good at writing English but I want to share this problem and hope this answer can help you.
Using "Python" on (Calculate field tool) in ModelBuilder:
- Python language: !shape.area@squarekilometers! use for Area squarekilometers
- Python language: !shape.area@squaremeters! use for Area squaremeters
- Python language: !shape.area@acres! use for Area in acres
- Python language: !shape.area@hectares! use for in Hectares
Explore related questions
See similar questions with these tags.