Change default field properties for number format in ArcMap? – www.scriptscoop.net

Anyone who has worked with numbers that have more than 14 digits has run into ArcMap's wonderful habit of converting any number of such length to e-notation. While changing this is a simple matter of going into the Field Properties and setting the number format, doing this repeatedly for every field in every table grows tiresome. Is there some secret environment setting or method to make number formats default to something besides 'Numeric'? Carto.FeatureLayer class implements Geodatabase.ITableFields and Geodatabase.ILayerFields interfaces. Via one of these two interfaces you can access FieldInfo property type of Geodatabase.IFieldInfo. Then use IFieldInfo.NumberFormat property. As best as I can tell, the answer is no, one can't set the default number format, not without programming (and for that one would start with INumericFormat as noted by Kirk. See example for Decimal Degree Angle Radian and Currency Format). Also the numeric display property is stored in the map (.mxd) or layer file (.lyr) and not a property if the table itself, so any changes made interactively or via the programming like the above won't apply to new data. Changing the field numeric type at creation time to doublem, float, etc. won't help either, for the same reason (it's not a field or table property). Presumably this means the only way forward is to hope someone builds and shares a 'change numeric format for all selected layers' button in Arcmap, and/or post a feature request to http://ideas.arcgis.com and hope the powers that be decide it's worth implementing as a user preference. Yes, in ArcMap 10 you'll want to go to the Customize pulldown-->, General Tab-->, and under the 'General' category, check the last option: Source.


Яндекс.Метрика Рейтинг@Mail.ru Free Web Counter
page counter
Last Modified: April 23, 2016 @ 11:06 am