Select to view content in your preferred language

Setting the number of decimal places in a feature class field using python

544
2
08-15-2023 08:04 AM
YS2388
by
New Contributor III

Hello,

I need to create a bunch of field with different number of decimal places. I'm using the "Add Field" tool to set the scale but it is never respected. These fields are in a gdb feature class. I'm using float or double. It is possible to set the number format and decimal places manually in Pro but this is not feasible in my case. 

Thank you for the help.

Tags (2)
2 Replies
DanPatterson
MVP Esteemed Contributor

From the help...

Add Field (Data Management)—ArcGIS Pro | Documentation

Note:
Field precision and scale are not supported in a file geodatabase feature class or table. If you enter a value for precision or scale, it will be ignored.

applies to the multiple fields tool as well


... sort of retired...
0 Kudos
YS2388
by
New Contributor III

Hi Dan,

Yes I read that as well and thought someone else might have a different idea. It is unfortunate that this feature is being retired...

Thanks

0 Kudos