<?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 modifying some values in an active template in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/modifying-some-values-in-an-active-template/m-p/848785#M4178</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I’ll need to &lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Editing#create-a-feature-using-the-current-template"&gt;Create a feature using the current templat&lt;/A&gt;e while&amp;nbsp;modifying some values in an active template (i.e. setting a common note or specific Asset ID value "before" creating a feature with the template, other default values in the template are Ok). I want to avoid two-steps process - create a feature with the template and then modify it in second Edit operation.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;var&lt;/SPAN&gt; &lt;SPAN class="" style="color: #24292e;"&gt;myTemplate&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d73a49;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #24292e;"&gt;ArcGIS&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #24292e;"&gt;Desktop&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #24292e;"&gt;Editing&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #24292e;"&gt;Templates&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #24292e;"&gt;EditingTemplate&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #24292e;"&gt;Current&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;var&lt;/SPAN&gt; &lt;SPAN class="" style="color: #24292e;"&gt;myGeometry&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d73a49;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #24292e;"&gt;_geometry&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;var&lt;/SPAN&gt; &lt;SPAN class="" style="color: #24292e;"&gt;op&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d73a49;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d73a49;"&gt;new&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d73a49;"&gt;ArcGIS&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #d73a49;"&gt;Desktop&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #d73a49;"&gt;Editing&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #6f42c1;"&gt;EditOperation&lt;/SPAN&gt;();&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #24292e;"&gt;op&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #24292e;"&gt;Name&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d73a49;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #032f62;"&gt;"Create my feature"&lt;/SPAN&gt;;&lt;BR /&gt;// &lt;EM&gt;NEED TO UPDATE some of myTemplate default attributes here&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #24292e;"&gt;op&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #6f42c1;"&gt;Create&lt;/SPAN&gt;(&lt;SPAN class="" style="color: #24292e;"&gt;myTemplate&lt;/SPAN&gt;, &lt;SPAN class="" style="color: #24292e;"&gt;myGeometry&lt;/SPAN&gt;); &lt;SPAN class="" style="color: #24292e;"&gt;op&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #6f42c1;"&gt;Execute&lt;/SPAN&gt;();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When creating a feature in ArcGIS Pro, one can open an active template pane to modify default values for features to be created with this template. Can this be done via API ?&lt;/P&gt;&lt;P&gt;I tried to leverage myTemplate.Inspector to get the Inspector that should contain the associated template values (as per the doc) but it is set to null . I guess I do not know how to use the API in this case. Any advise, code snippets will be appreciated. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 06 Jan 2019 00:05:22 GMT</pubDate>
    <dc:creator>SergueiSokolov</dc:creator>
    <dc:date>2019-01-06T00:05:22Z</dc:date>
    <item>
      <title>modifying some values in an active template</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/modifying-some-values-in-an-active-template/m-p/848785#M4178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I’ll need to &lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Editing#create-a-feature-using-the-current-template"&gt;Create a feature using the current templat&lt;/A&gt;e while&amp;nbsp;modifying some values in an active template (i.e. setting a common note or specific Asset ID value "before" creating a feature with the template, other default values in the template are Ok). I want to avoid two-steps process - create a feature with the template and then modify it in second Edit operation.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;var&lt;/SPAN&gt; &lt;SPAN class="" style="color: #24292e;"&gt;myTemplate&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d73a49;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #24292e;"&gt;ArcGIS&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #24292e;"&gt;Desktop&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #24292e;"&gt;Editing&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #24292e;"&gt;Templates&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #24292e;"&gt;EditingTemplate&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #24292e;"&gt;Current&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;var&lt;/SPAN&gt; &lt;SPAN class="" style="color: #24292e;"&gt;myGeometry&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d73a49;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #24292e;"&gt;_geometry&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #d73a49;"&gt;var&lt;/SPAN&gt; &lt;SPAN class="" style="color: #24292e;"&gt;op&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d73a49;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d73a49;"&gt;new&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d73a49;"&gt;ArcGIS&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #d73a49;"&gt;Desktop&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #d73a49;"&gt;Editing&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #6f42c1;"&gt;EditOperation&lt;/SPAN&gt;();&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #24292e;"&gt;op&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #24292e;"&gt;Name&lt;/SPAN&gt; &lt;SPAN class="" style="color: #d73a49;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #032f62;"&gt;"Create my feature"&lt;/SPAN&gt;;&lt;BR /&gt;// &lt;EM&gt;NEED TO UPDATE some of myTemplate default attributes here&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #24292e;"&gt;op&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #6f42c1;"&gt;Create&lt;/SPAN&gt;(&lt;SPAN class="" style="color: #24292e;"&gt;myTemplate&lt;/SPAN&gt;, &lt;SPAN class="" style="color: #24292e;"&gt;myGeometry&lt;/SPAN&gt;); &lt;SPAN class="" style="color: #24292e;"&gt;op&lt;/SPAN&gt;.&lt;SPAN class="" style="color: #6f42c1;"&gt;Execute&lt;/SPAN&gt;();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When creating a feature in ArcGIS Pro, one can open an active template pane to modify default values for features to be created with this template. Can this be done via API ?&lt;/P&gt;&lt;P&gt;I tried to leverage myTemplate.Inspector to get the Inspector that should contain the associated template values (as per the doc) but it is set to null . I guess I do not know how to use the API in this case. Any advise, code snippets will be appreciated. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Jan 2019 00:05:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/modifying-some-values-in-an-active-template/m-p/848785#M4178</guid>
      <dc:creator>SergueiSokolov</dc:creator>
      <dc:date>2019-01-06T00:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: modifying some values in an active template</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/modifying-some-values-in-an-active-template/m-p/848786#M4179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Serguei,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are retrieving a template that is not active, you need to activate that template before the inspector object is&amp;nbsp;available.&amp;nbsp; &amp;nbsp;Here is some sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var map = MapView.Active?.Map;&lt;BR /&gt; if (map == null)&lt;BR /&gt;&amp;nbsp; return;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var myTemplate = map.FindLayers("testPoints").FirstOrDefault()?.GetTemplate("testPoints");&lt;BR /&gt; if (myTemplate == null)&lt;BR /&gt;&amp;nbsp; return;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// activate the template&lt;BR /&gt; myTemplate.ActivateDefaultToolAsync();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// retrieve the inspector&lt;BR /&gt; var insp = myTemplate.Inspector;&lt;/P&gt;&lt;P&gt;// modify fields&lt;BR /&gt; insp["field1"] = value1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// perform the edit operation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Narelle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2019 18:13:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/modifying-some-values-in-an-active-template/m-p/848786#M4179</guid>
      <dc:creator>NarelleChedzey</dc:creator>
      <dc:date>2019-01-07T18:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: modifying some values in an active template</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/modifying-some-values-in-an-active-template/m-p/848787#M4180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Narene&lt;/P&gt;&lt;P&gt;This worked. I appreciate your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2019 02:21:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/modifying-some-values-in-an-active-template/m-p/848787#M4180</guid>
      <dc:creator>SergueiSokolov</dc:creator>
      <dc:date>2019-01-14T02:21:47Z</dc:date>
    </item>
  </channel>
</rss>

