Is it posssible to perform any math on ESRI ArcMap dynamic text? For example I have the area of a SDE park layer's SHAPE.AREA, but it is in m2 because the layer is in NAD_1983_UTM_Zone_17N. I want to show the area in hectares (m2 / 10000). How do I do this? Is it possible to add two fields together and display it in dynamic text?
-
1You can just create a field in the attribute table and use the field calculator. ESRI Help Files– RoyCommented Oct 11, 2012 at 14:44
-
No, I want it done in the dynamic text. Adding fields in a SDE layer everytime I want to do some math is not a practicable option. The labeling allows math to be done, but I want it in dynamic text where it doesn't cover the features in the map.– DavidCommented Oct 11, 2012 at 15:00
4 Answers
This from Jeffrey Barrette, an ESRI employee:
No. Dynamic Text provides many different formatting options for dates, times, coord systems, etc but it does not provide the logic to perform mathematical operations. You would need to incorporate Python and then use arcpy.mapping to update text elements in a layout.
To do this you can edit the field properties (right click the field in the attribute table) and set the NUMBER FORMAT to RATE (halfway down on the right hand side) and then edit the rate (basically a divide by) and suffix e.g. hec.
There are further options for decimal places and justification if you want to further change the display.
These options will change how the number looks in labels and when being referenced by data driven pages.
see esri help here http://resources.arcgis.com/en/help/main/10.1/index.html#/Formatting_numeric_fields_in_tables/005s0000003s000000/
You can use the Data Driven Page Display Expression option . So in your case the display expression on the Display tab of the Layer properties would be SHAPE.AREA/10000
Open layer Properties and go to the Labels tab. Click the Expression Button. Type your calculation (Area/10000 in this case) inside the expression area.
Make sure that Labeling is enabled for this layer.
If you want to use advanced scripts(VB,JS) for your expressions, you may check the Advanced option
Read more about expressions from ESRI Documentation
-
I DON'T want to do this as labelling. I used the labelling as an example of something close to what is needed. I want it done in dynamic text.– DavidCommented Oct 11, 2012 at 16:28