<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Change name of a subtype through code in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/change-name-of-a-subtype-through-code/m-p/711247#M19015</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to change the name of a feature class subtype using ArcObjects (subtype code will remain the same).&amp;nbsp; 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.&amp;nbsp; On the ISubtypes interface the Subtypes and SubtypeName properties are read-only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;UPDATE SDE.GDB_ITEMS
SET Definition.modify('replace value of (//DEFeatureClassInfo/Subtypes/Subtype[SubtypeCode=70301]/SubtypeName/text())[1] with ("Inverter Location")')
WHERE NAME = 'Electricity.ArcFM.Inverter'
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 06:28:48 GMT</pubDate>
    <dc:creator>NeilEtheridge</dc:creator>
    <dc:date>2021-12-12T06:28:48Z</dc:date>
    <item>
      <title>Change name of a subtype through code</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/change-name-of-a-subtype-through-code/m-p/711247#M19015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to change the name of a feature class subtype using ArcObjects (subtype code will remain the same).&amp;nbsp; 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.&amp;nbsp; On the ISubtypes interface the Subtypes and SubtypeName properties are read-only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;UPDATE SDE.GDB_ITEMS
SET Definition.modify('replace value of (//DEFeatureClassInfo/Subtypes/Subtype[SubtypeCode=70301]/SubtypeName/text())[1] with ("Inverter Location")')
WHERE NAME = 'Electricity.ArcFM.Inverter'
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:28:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/change-name-of-a-subtype-through-code/m-p/711247#M19015</guid>
      <dc:creator>NeilEtheridge</dc:creator>
      <dc:date>2021-12-12T06:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Change name of a subtype through code</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/change-name-of-a-subtype-through-code/m-p/711248#M19016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Neil,&lt;/P&gt;&lt;P&gt;There's no way to change the description of an existing subtype in ArcObjects. Catalog makes the change by deleting and re-adding the subtype that has been modified.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 18:13:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/change-name-of-a-subtype-through-code/m-p/711248#M19016</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-07-27T18:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Change name of a subtype through code</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/change-name-of-a-subtype-through-code/m-p/711249#M19017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sean.&amp;nbsp; Based on your advice regarding how ArcCatalog performs the rename I checked to see if the geometric network connectivity rules for this subtype were preserved.&amp;nbsp; Sadly they are not.&amp;nbsp; This class is not involved in a relationship but I would assume relationship rules would also be lost.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 22:54:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/change-name-of-a-subtype-through-code/m-p/711249#M19017</guid>
      <dc:creator>NeilEtheridge</dc:creator>
      <dc:date>2016-07-27T22:54:20Z</dc:date>
    </item>
  </channel>
</rss>

