<?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 Re: Place a Layer from a Geodatabase onto a Map (unopened) -  Python code in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214368#M60041</link>
    <description>&lt;P&gt;Thank you Dan,&lt;BR /&gt;&lt;BR /&gt;That was painless - now I've got a 'Stream.lyr' fc, which should be more acceptable for Map methods.&lt;BR /&gt;&lt;BR /&gt;I'll attempt to move this into the map now. (fingers crossed)&lt;/P&gt;</description>
    <pubDate>Tue, 20 Sep 2022 20:17:33 GMT</pubDate>
    <dc:creator>Anthony_R_McKay</dc:creator>
    <dc:date>2022-09-20T20:17:33Z</dc:date>
    <item>
      <title>Place a Layer from a Geodatabase onto a Map (unopened) -  Python code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214079#M59995</link>
      <description>&lt;P&gt;A Python project - A river flow analysis - I've generated my vector polyline object for the rivers (four classifications) - how do I move this into a map?&lt;BR /&gt;&lt;BR /&gt;This fc is saved in the gdb - a map already exists.&lt;BR /&gt;&lt;BR /&gt;I want to use Python to add some symbology, but the code I'm using needs the layer to be in a map.&lt;BR /&gt;&lt;BR /&gt;What I need to know is the Python code to send a layer to an existing map from the gdb without opening ArcGIS Pro and doing it manually.&lt;BR /&gt;&lt;BR /&gt;I'd also like to know how to change the line thickness symbology with Python eventually.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 04:32:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214079#M59995</guid>
      <dc:creator>Anthony_R_McKay</dc:creator>
      <dc:date>2022-09-20T04:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Place a Layer from a Geodatabase onto a Map (unopened) -  Python code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214101#M59999</link>
      <description>&lt;P&gt;Did you check out the methods in&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/map-class.htm" target="_blank"&gt;Map—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 07:18:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214101#M59999</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-09-20T07:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Place a Layer from a Geodatabase onto a Map (unopened) -  Python code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214108#M60003</link>
      <description>&lt;P&gt;Thanks Dan,&lt;BR /&gt;&lt;BR /&gt;I glanced through this earlier today, but I didn't spot:&lt;BR /&gt;&lt;BR /&gt;"addLayer (add_layer_or_layerfile, {add_position})"&lt;BR /&gt;&lt;BR /&gt;"Provides the ability to add a &lt;A href="https://pro.arcgis.com/en/pro-app/3.0/arcpy/mapping/layer-class.htm" target="_blank" rel="noopener"&gt;Layer&lt;/A&gt; or &lt;A href="https://pro.arcgis.com/en/pro-app/3.0/arcpy/mapping/layerfile-class.htm" target="_blank" rel="noopener"&gt;LayerFile&lt;/A&gt; to a map within a project (&lt;SPAN class=""&gt;.aprx&lt;/SPAN&gt;) using basic placement options."&lt;BR /&gt;&lt;BR /&gt;I'll give this a try now.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Anthony&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 07:41:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214108#M60003</guid>
      <dc:creator>Anthony_R_McKay</dc:creator>
      <dc:date>2022-09-20T07:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Place a Layer from a Geodatabase onto a Map (unopened) -  Python code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214134#M60005</link>
      <description>&lt;P&gt;Not doing at all well with this - I'm either getting the syntax wrong or the file type is incompatible. The examples given are less than helpful.&lt;BR /&gt;&lt;BR /&gt;Here is an illustration of what I want to do = in ArcGIS Pro it would be "right click&amp;gt;add to current map"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51626i9C2328C10063BBC4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 10:09:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214134#M60005</guid>
      <dc:creator>Anthony_R_McKay</dc:creator>
      <dc:date>2022-09-20T10:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Place a Layer from a Geodatabase onto a Map (unopened) -  Python code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214140#M60007</link>
      <description>&lt;P&gt;If you know the source data, then&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/make-feature-layer.htm" target="_blank"&gt;Make Feature Layer (Data Management)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;followed by&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/copy-features.htm" target="_blank"&gt;Copy Features (Data Management)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;if you want it to be permanent&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 10:59:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214140#M60007</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-09-20T10:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Place a Layer from a Geodatabase onto a Map (unopened) -  Python code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214368#M60041</link>
      <description>&lt;P&gt;Thank you Dan,&lt;BR /&gt;&lt;BR /&gt;That was painless - now I've got a 'Stream.lyr' fc, which should be more acceptable for Map methods.&lt;BR /&gt;&lt;BR /&gt;I'll attempt to move this into the map now. (fingers crossed)&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 20:17:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214368#M60041</guid>
      <dc:creator>Anthony_R_McKay</dc:creator>
      <dc:date>2022-09-20T20:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Place a Layer from a Geodatabase onto a Map (unopened) -  Python code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214382#M60044</link>
      <description>&lt;P&gt;I feel I'm close, but I can't the script to accept the 'Stream_lyr' value - both full path and workspace get the same error.&lt;/P&gt;&lt;P&gt;This is with ArcGIS closed. The variables are accepted when I run the script with the 'insert layer' commented out.&lt;BR /&gt;&lt;BR /&gt;I'm probably making a rookie mistake&amp;nbsp; - but I'm out of ideas.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51677i5C2BC9BDB799D034/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 20:54:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214382#M60044</guid>
      <dc:creator>Anthony_R_McKay</dc:creator>
      <dc:date>2022-09-20T20:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Place a Layer from a Geodatabase onto a Map (unopened) -  Python code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214464#M60051</link>
      <description>&lt;P&gt;I can't tell from the script and the above as to whether you created a "layer" on disk as a *.lyrx file which would be in a folder or you want to make one from a featureclass in the geodatabase.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 01:25:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214464#M60051</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-09-21T01:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: Place a Layer from a Geodatabase onto a Map (unopened) -  Python code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214467#M60052</link>
      <description>&lt;P&gt;'Stream_lyr' is in the original gdb folder where the 'Stream' shapefile was.&lt;BR /&gt;&lt;BR /&gt;I've just realised that the name 'Stream_lyr' is just the name I gave the script to output.&lt;BR /&gt;&lt;BR /&gt;Checked - it's just a copy of my original file with a deceptive name - back to square one. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks anyway, for your help Dan.&lt;BR /&gt;&lt;BR /&gt;So I still need to go from this to this - using Python script.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Capture1.JPG" style="width: 299px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51711i5AE0ABB300483C2D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.JPG" alt="Capture1.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="Capture2.JPG" style="width: 285px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51712i6E766B7B0DE4BEA6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.JPG" alt="Capture2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 03:06:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214467#M60052</guid>
      <dc:creator>Anthony_R_McKay</dc:creator>
      <dc:date>2022-09-21T03:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Place a Layer from a Geodatabase onto a Map (unopened) -  Python code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214474#M60053</link>
      <description>&lt;P&gt;It's the inserted layer name that is killing me:&lt;BR /&gt;&lt;BR /&gt;Full paths, indexes, simple strings, nothing works. ValueErrors at every turn&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;"layerfilename = &lt;SPAN&gt;r"C:\Users\OEM\Documents\Tony\Massey\Paper 2 Labs\Lab7_Rasters\Wellington\Wellington.gdb\Stream"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;arcpy&lt;BR /&gt;map_object = arcpy.mp.ArcGISProject(project_path)&lt;BR /&gt;insertLyr = arcpy.mp.LayerFile(layerfilename)&lt;BR /&gt;m = map_object.listMaps(&lt;SPAN&gt;'*'&lt;/SPAN&gt;)[&lt;SPAN&gt;0&lt;/SPAN&gt;]&lt;BR /&gt;refLyr = m.listLayers(&lt;SPAN&gt;"Catchment_Bnd"&lt;/SPAN&gt;)[&lt;SPAN&gt;0&lt;/SPAN&gt;]&lt;BR /&gt;m.insertLayer(refLyr, insertLyr, &lt;SPAN&gt;"BEFORE"&lt;/SPAN&gt;)&lt;BR /&gt;map_object.save()&lt;BR /&gt;&lt;SPAN&gt;del &lt;/SPAN&gt;map_object"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 03:31:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214474#M60053</guid>
      <dc:creator>Anthony_R_McKay</dc:creator>
      <dc:date>2022-09-21T03:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Place a Layer from a Geodatabase onto a Map (unopened) -  Python code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214484#M60055</link>
      <description>&lt;P&gt;Solved - but I had to create a lyrx Layer File and move the layer to the map from there - but the result is what I wanted - thanks to Dan for pointing me in the right direction.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.JPG" style="width: 996px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51713iF72580D54C337529/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.JPG" alt="Capture2.JPG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 05:26:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214484#M60055</guid>
      <dc:creator>Anthony_R_McKay</dc:creator>
      <dc:date>2022-09-21T05:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Place a Layer from a Geodatabase onto a Map (unopened) -  Python code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214523#M60062</link>
      <description>&lt;P&gt;glad something I suggested work&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 10:05:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/place-a-layer-from-a-geodatabase-onto-a-map/m-p/1214523#M60062</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-09-21T10:05:35Z</dc:date>
    </item>
  </channel>
</rss>

