<?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 to create Layer from selected features in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-layer-from-selected-features/m-p/870790#M5159</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Is there a simpler way to create a layer from selected features?&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;From the research I have done I would:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Get the selected feature&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;--&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;create a list/array of OBJECTIDs&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;--&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Copy the layer containing the selected features --&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt; apply a definition query based on the list of OBJECTIDs&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;--&amp;gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;…&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;This is obviously an abbreviated description, but I do not see a simpler approach.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Oct 2018 15:03:35 GMT</pubDate>
    <dc:creator>BradJones3</dc:creator>
    <dc:date>2018-10-22T15:03:35Z</dc:date>
    <item>
      <title>How to create Layer from selected features</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-layer-from-selected-features/m-p/870790#M5159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Is there a simpler way to create a layer from selected features?&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;From the research I have done I would:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Get the selected feature&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;--&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;create a list/array of OBJECTIDs&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;--&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Copy the layer containing the selected features --&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt; apply a definition query based on the list of OBJECTIDs&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;--&amp;gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;…&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;This is obviously an abbreviated description, but I do not see a simpler approach.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2018 15:03:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-layer-from-selected-features/m-p/870790#M5159</guid>
      <dc:creator>BradJones3</dc:creator>
      <dc:date>2018-10-22T15:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Layer from selected features</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-layer-from-selected-features/m-p/870791#M5160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also add a&amp;nbsp;&lt;SPAN style="font-size: 11.0pt;"&gt;definition to a feature layer using BasicFeatureLayer.SetDefinitionQuery.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;You can see a sample with this method:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/QueryBuilderControl"&gt;QueryBuilderControl&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Uma&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 00:19:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-layer-from-selected-features/m-p/870791#M5160</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2018-10-24T00:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Layer from selected features</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-layer-from-selected-features/m-p/870792#M5161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Uma, I used &lt;STRONG&gt;CreateFeatureLayer&lt;/STRONG&gt; then the &lt;STRONG&gt;SetDefinitionQuery&lt;/STRONG&gt; method on the layer. &amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; slectionLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; LayerFactory&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Instance&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;CreateFeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;uri&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; mapView&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Selection Layer"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

selectionLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;SetDefinitionQuery&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;defQuery&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I noticed that the &lt;STRONG&gt;CreateFeatureLayer&lt;/STRONG&gt; method has the optional parameter &lt;A href="http://pro.arcgis.com/en/pro-app/sdk/api-reference/index.html#topic12171.html" rel="nofollow noopener noreferrer" target="_blank"&gt;RendererDefinition&lt;/A&gt;. I couldn't find any documentation or examples on how to use this parameter to set a simple single symbol renderer. I found plenty for graduated and unique colour symbol examples.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This isn't a big deal.&amp;nbsp; I just used the &lt;STRONG&gt;CIMSimpleRenderer&lt;/STRONG&gt; class to create a renderer then &lt;STRONG&gt;SetRenderer&lt;/STRONG&gt; after the layer has loaded.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just curious how this would work since I initially wanted the layer load with the renderer set.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:51:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-layer-from-selected-features/m-p/870792#M5161</guid>
      <dc:creator>BradJones3</dc:creator>
      <dc:date>2021-12-12T10:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Layer from selected features</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-layer-from-selected-features/m-p/870793#M5162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are some snippets that make simple renderers:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Renderer#simplerenderers"&gt;SimpleRenderers&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 23:55:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-layer-from-selected-features/m-p/870793#M5162</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2018-10-24T23:55:11Z</dc:date>
    </item>
  </channel>
</rss>

