Select to view content in your preferred language

increase length of field

4015
4
Jump to solution
05-29-2015 12:01 AM
RobertArens1
Deactivated User

Hi,

in ArcCatalog (using 10.2) I can increase the length of a field (string) by hand (see attachments).

But how can I do this programmatically with ArcObjects?

IClassSchemaEdit only allows me to alter the fieldname.

If there is no way to do this I have to create a new field with correct

length and then I have to copy values from the old field into the new one.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
nicogis
MVP Frequent Contributor

Yes you can only increase if fc is not empty because there isn't risk loss data

FieldLength and nullability are only supported on internal interfaces.
The Alter Field GP tool supports this in ArcGIS Pro.

View solution in original post

0 Kudos
4 Replies
nicogis
MVP Frequent Contributor

you can do it because your featureclass is empty

42783 - Increase the character length for a text field in ArcMap

RobertArens1
Deactivated User

No, that is wrong,

you can increase and decrease when fc is empty!

If the fc is not empty you are able to increase.

I also thougth that this is impossible but it worked (ArcGIS Desktop 10.2.2 -> ArcCatalog)

So maybe this is a usefull bug

0 Kudos
nicogis
MVP Frequent Contributor

Yes you can only increase if fc is not empty because there isn't risk loss data

FieldLength and nullability are only supported on internal interfaces.
The Alter Field GP tool supports this in ArcGIS Pro.

0 Kudos
RobertArens1
Deactivated User

Hi,

FieldLength and nullability are only supported on internal interfaces.

this is the answer i was afraid of.

That means I have to rename existing fields, create new fields with correct fieldlength, copy features and delete renamed field.

Thanks, marked as answered...

0 Kudos