Problem adding field to existing shapefile

1731
5
Jump to solution
11-18-2016 01:30 PM
shawnstanley
New Contributor III

hello All

I have a VB.NET set of tools and part of it which used to work does not seem to work any more as it used to.  The part of the script which is not working properly anymore is when adding a field to an existing shapefile.  Although I am setting the precision and scale properties of the ifieldedit interface the resultant field displays in ArcMap as having precision and scale values of 0.  The type of the field is esriFieldTypeDouble.

What am I missing here?

regards

shawn

0 Kudos
1 Solution

Accepted Solutions
shawnstanley
New Contributor III

aha

a bit more hunting found the answer.  It's a known bug in 10.4 and 10.4.1

BUG-000099718 -> Numeric values stored in DOUBLE and FLOAT fields are corrupted in shapefiles created in ArcGIS for Desktop 10.4 and 10.4.1. Shapefiles that are created at earlier versions perform correctly when opened in ArcGIS for Desktop 10.4.

cheers

shawn

View solution in original post

0 Kudos
5 Replies
NeilAyres
MVP Alum

Although I have no idea what you are doing in VB.NET...

Are you sure that the shapefile (in reality dbf, dbase) can support precision and scale.

specifying-precision-and-scale-of-new-field-using-arcpy 

0 Kudos
shawnstanley
New Contributor III

hello Neil

I am creating some data as part of a process in VB.NET and then I want to add that data to an existing shapefile.  I didn't think that the actual particulars of what I was doing was relevant to the underlying question that I had and didn't want to obscure my question.

Thanks for the link, although my reading of it is that it can support precision and scale.  This also supports my recollection that my script used to add the field with precision and scale values in the past.

Although we don't have earlier versions of ArcGIS installed here at work we do have ArcView 3.3 still working.  So I tested in that the addition of a field with precision and scale values to a shapefile.  The shapefile when opened in ArcGIS 10.4.1 reports the precision and scale correctly.

When I tried to add a new field directly through the table interface in ArcMap it did not create the field with precision and scale values.

regards

shawn

0 Kudos
shawnstanley
New Contributor III

aha

a bit more hunting found the answer.  It's a known bug in 10.4 and 10.4.1

BUG-000099718 -> Numeric values stored in DOUBLE and FLOAT fields are corrupted in shapefiles created in ArcGIS for Desktop 10.4 and 10.4.1. Shapefiles that are created at earlier versions perform correctly when opened in ArcGIS for Desktop 10.4.

cheers

shawn

0 Kudos
RDHarles
Occasional Contributor

It's STILL an issue in 10.5!