<?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 doesn't save edits in attributes in feature templates in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/doesn-t-save-edits-in-attributes-in-feature/m-p/24413#M634</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;This is a toolbar created to create mapunitpoly templates. Is there a reason that other values beside the defaults don't save? Also I have a problem when editing that some of the templates get deleted and can't be recovered. Is there anyway to stop this from happening?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222;"&gt;public static void UpdateMapUnitPolysFeatureTemplates(IWorkspace theWorkspace)&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp; // Get the MapUnitPolys Layer from the ToC&lt;BR /&gt;&amp;nbsp; IFeatureLayer theLayer = commonFunctions.FindFeatureLayer(theWorkspace, "MapUnitPolys");&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; // If the layer was not found, don't try and update the templates!&lt;BR /&gt;&amp;nbsp; if (theLayer == null) { return; }&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; // Get a reference to the template editor, remove current templates&lt;BR /&gt;&amp;nbsp; IEditor3 templateEditor = (IEditor3)ArcMap.Editor;&lt;BR /&gt;&amp;nbsp; templateEditor.RemoveAllTemplatesInLayer((ILayer)theLayer);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; // Get the DMU entries&lt;BR /&gt;&amp;nbsp; var sortedDmu = GetDmuSortedByHierarchy(theWorkspace);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; // Loop through the DMU, add templates to an array&lt;BR /&gt;&amp;nbsp; IArray templateArray = new ArrayClass();&lt;BR /&gt;&amp;nbsp; foreach (KeyValuePair&amp;lt;string, DescriptionOfMapUnitsAccess.DescriptionOfMapUnit&amp;gt; anEntry in sortedDmu)&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp; // Get this DMU entry&lt;BR /&gt;&amp;nbsp; DescriptionOfMapUnitsAccess.DescriptionOfMapUnit dmuEntry = anEntry.Value;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; // Build the template if this is not a heading&lt;BR /&gt;&amp;nbsp; if (dmuEntry.ParagraphStyle.Contains("Heading") == true) { continue; }&lt;BR /&gt;&amp;nbsp; IEditTemplateFactory templateFactory = new EditTemplateFactoryClass();&lt;BR /&gt;&amp;nbsp; IEditTemplate newTemplate = templateFactory.Create(dmuEntry.MapUnit + " - " + dmuEntry.Name, (ILayer)theLayer);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; // Set the Template's default values&lt;BR /&gt;&amp;nbsp; newTemplate.SetDefaultValue("MapUnit", dmuEntry.MapUnit, false);&lt;BR /&gt;&amp;nbsp; newTemplate.SetDefaultValue("Label", dmuEntry.Label, false);&lt;BR /&gt;&amp;nbsp; newTemplate.SetDefaultValue("IdentityConfidence", "certain", false);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; // Add the template to the array&lt;BR /&gt;&amp;nbsp; templateArray.Add(newTemplate);&lt;BR /&gt;&amp;nbsp; }&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2015 19:03:54 GMT</pubDate>
    <dc:creator>LauraBookman1</dc:creator>
    <dc:date>2015-03-18T19:03:54Z</dc:date>
    <item>
      <title>doesn't save edits in attributes in feature templates</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/doesn-t-save-edits-in-attributes-in-feature/m-p/24413#M634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;This is a toolbar created to create mapunitpoly templates. Is there a reason that other values beside the defaults don't save? Also I have a problem when editing that some of the templates get deleted and can't be recovered. Is there anyway to stop this from happening?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222;"&gt;public static void UpdateMapUnitPolysFeatureTemplates(IWorkspace theWorkspace)&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp; // Get the MapUnitPolys Layer from the ToC&lt;BR /&gt;&amp;nbsp; IFeatureLayer theLayer = commonFunctions.FindFeatureLayer(theWorkspace, "MapUnitPolys");&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; // If the layer was not found, don't try and update the templates!&lt;BR /&gt;&amp;nbsp; if (theLayer == null) { return; }&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; // Get a reference to the template editor, remove current templates&lt;BR /&gt;&amp;nbsp; IEditor3 templateEditor = (IEditor3)ArcMap.Editor;&lt;BR /&gt;&amp;nbsp; templateEditor.RemoveAllTemplatesInLayer((ILayer)theLayer);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; // Get the DMU entries&lt;BR /&gt;&amp;nbsp; var sortedDmu = GetDmuSortedByHierarchy(theWorkspace);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; // Loop through the DMU, add templates to an array&lt;BR /&gt;&amp;nbsp; IArray templateArray = new ArrayClass();&lt;BR /&gt;&amp;nbsp; foreach (KeyValuePair&amp;lt;string, DescriptionOfMapUnitsAccess.DescriptionOfMapUnit&amp;gt; anEntry in sortedDmu)&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp; // Get this DMU entry&lt;BR /&gt;&amp;nbsp; DescriptionOfMapUnitsAccess.DescriptionOfMapUnit dmuEntry = anEntry.Value;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; // Build the template if this is not a heading&lt;BR /&gt;&amp;nbsp; if (dmuEntry.ParagraphStyle.Contains("Heading") == true) { continue; }&lt;BR /&gt;&amp;nbsp; IEditTemplateFactory templateFactory = new EditTemplateFactoryClass();&lt;BR /&gt;&amp;nbsp; IEditTemplate newTemplate = templateFactory.Create(dmuEntry.MapUnit + " - " + dmuEntry.Name, (ILayer)theLayer);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; // Set the Template's default values&lt;BR /&gt;&amp;nbsp; newTemplate.SetDefaultValue("MapUnit", dmuEntry.MapUnit, false);&lt;BR /&gt;&amp;nbsp; newTemplate.SetDefaultValue("Label", dmuEntry.Label, false);&lt;BR /&gt;&amp;nbsp; newTemplate.SetDefaultValue("IdentityConfidence", "certain", false);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; // Add the template to the array&lt;BR /&gt;&amp;nbsp; templateArray.Add(newTemplate);&lt;BR /&gt;&amp;nbsp; }&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 19:03:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/doesn-t-save-edits-in-attributes-in-feature/m-p/24413#M634</guid>
      <dc:creator>LauraBookman1</dc:creator>
      <dc:date>2015-03-18T19:03:54Z</dc:date>
    </item>
  </channel>
</rss>

