AnsweredAssumed Answered

Change name of a subtype through code

Question asked by neiletheridge1 on Jul 26, 2016
Latest reply on Jul 27, 2016 by neiletheridge1

I want to change the name of a feature class subtype using ArcObjects (subtype code will remain the same).  The feature class is part of a geometric network so I don't want to delete and recreate it as it has connectivity rules associated with it.  On the ISubtypes interface the Subtypes and SubtypeName properties are read-only.


The name can be changed manually through the interface in ArcCatalog but this is required for a script to progress schema changes through dev, test, prod environments.


It can be achieved through a complete hack of the GDB_ITEMS table using the SQL below but I don't really want to go there.


SET Definition.modify('replace value of (//DEFeatureClassInfo/Subtypes/Subtype[SubtypeCode=70301]/SubtypeName/text())[1] with ("Inverter Location")')
WHERE NAME = 'Electricity.ArcFM.Inverter'