How to modify Field properties with python?

4404
6
02-03-2015 04:48 PM
SaidAkif
New Contributor III

Hi all

I am wondering how to change a Double field values formatting. I am looking specifically to add the thousand separator on the Pad with zero.

Usually, I right click on the field in the attributes tables, then click on properties. On the field properties interface, I click on numeric and I select Thousand separator and Pad with zero.

So how can do that with python (arcpy)??

Thanks

0 Kudos
6 Replies
XanderBakker
Esri Esteemed Contributor

I don't think these properties are revealed to Python (arcpy),  unless you want to use ArcObjects in Python.

You can create an additional field (type string) and write the formatted values to this field, but I don't think this is what you are looking for...

DanPatterson_Retired
MVP Emeritus

to add to Xander Bakker correct summary...if it is for purely visual purposes, you could look at the python snippets section and format them in a text field Some Python Snippets

0 Kudos
SaidAkif
New Contributor III

Hi

Thanks for your quick response

I want modify the properties of a field without criating one as proposed by Dan.

At least, is there a way to reach the properties od a layer (HTM poup, Fields, ....) with python

Thanks

0 Kudos
DanPatterson_Retired
MVP Emeritus

The only field properties that can be exposed and changed are listed here in modify field properties if you have an advanced license

SaidAkif
New Contributor III

thanks

0 Kudos
sapnas
by
Occasional Contributor III

I have similar scenario where I have to modify the length of the field. Can this be implemented with arcobjects?

0 Kudos