<?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 How do I activate the construction tool for a specific layer in code?  in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-do-i-activate-the-construction-tool-for-a/m-p/734207#M185</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a&amp;nbsp;map project with some business layers that my users want to edit. For that, the users sometimes need to sketch a support line in a temporary layer. When they are satisfied with the support line, they edit&amp;nbsp;objects in the business layers by tracing along the support line. It sounds like a backwards way of doing things, I know, but it actually makes sense, when the edits you are doing are complex, and sometimes depends on a lot of different background data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, my problem is, that I want to activate the construction tool for the support layer by the click of a button. I don't want the user to go into the &lt;SPAN&gt;Create Features&amp;nbsp;&lt;/SPAN&gt;tab, and activate it there. Actually, I'd prefer to hide the Create Features tab entirely by configuration, but I can only do that if I can activate construction in code. However, I haven't been able to find examples on how to do this. So now, i turn to you, dear&amp;nbsp; colleagues, in the hope that you can help me.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Jun 2019 09:13:40 GMT</pubDate>
    <dc:creator>MortenJespersen1</dc:creator>
    <dc:date>2019-06-06T09:13:40Z</dc:date>
    <item>
      <title>How do I activate the construction tool for a specific layer in code?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-do-i-activate-the-construction-tool-for-a/m-p/734207#M185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a&amp;nbsp;map project with some business layers that my users want to edit. For that, the users sometimes need to sketch a support line in a temporary layer. When they are satisfied with the support line, they edit&amp;nbsp;objects in the business layers by tracing along the support line. It sounds like a backwards way of doing things, I know, but it actually makes sense, when the edits you are doing are complex, and sometimes depends on a lot of different background data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, my problem is, that I want to activate the construction tool for the support layer by the click of a button. I don't want the user to go into the &lt;SPAN&gt;Create Features&amp;nbsp;&lt;/SPAN&gt;tab, and activate it there. Actually, I'd prefer to hide the Create Features tab entirely by configuration, but I can only do that if I can activate construction in code. However, I haven't been able to find examples on how to do this. So now, i turn to you, dear&amp;nbsp; colleagues, in the hope that you can help me.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2019 09:13:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-do-i-activate-the-construction-tool-for-a/m-p/734207#M185</guid>
      <dc:creator>MortenJespersen1</dc:creator>
      <dc:date>2019-06-06T09:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I activate the construction tool for a specific layer in code?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-do-i-activate-the-construction-tool-for-a/m-p/734208#M186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the solution.&amp;nbsp;Maybe someone can use it in the future:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt;private void ActivateConstructionTool(string targetLayerName)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt;{&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt;QueuedTask.Run(() =&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt; {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;var map = ArcGIS.Desktop.Mapping.MapView.Active.Map;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;if (map == null)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach (Layer layer in map.GetLayersAsFlattenedList())&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (layer.Name.Equals(targetLayerName))&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var myTemplates = layer.GetTemplates();&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var myTemplate = myTemplates.ToList()[0];&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;myTemplate.ActivateDefaultToolAsync();&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt;});&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2019 12:10:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-do-i-activate-the-construction-tool-for-a/m-p/734208#M186</guid>
      <dc:creator>MortenJespersen1</dc:creator>
      <dc:date>2019-06-06T12:10:06Z</dc:date>
    </item>
  </channel>
</rss>

