<?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 Add data into ArcMap from geodatabase using Python in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18311#M976</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There must be a way to do &lt;STRONG&gt;&lt;EM&gt;Add Data&lt;/EM&gt;&lt;/STRONG&gt; from a .gdb using Python. I looked it up but could not find not one hit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 14 Nov 2015 03:33:17 GMT</pubDate>
    <dc:creator>MarcelAfif</dc:creator>
    <dc:date>2015-11-14T03:33:17Z</dc:date>
    <item>
      <title>Add data into ArcMap from geodatabase using Python</title>
      <link>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18311#M976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There must be a way to do &lt;STRONG&gt;&lt;EM&gt;Add Data&lt;/EM&gt;&lt;/STRONG&gt; from a .gdb using Python. I looked it up but could not find not one hit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Nov 2015 03:33:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18311#M976</guid>
      <dc:creator>MarcelAfif</dc:creator>
      <dc:date>2015-11-14T03:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Add data into ArcMap from geodatabase using Python</title>
      <link>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18312#M977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The &lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/main/arcgis-pro-arcpy-reference.htm"&gt;arcpy function and class tree&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/make-feature-layer.htm"&gt;Makefeaturelayer&lt;/A&gt;​ when you are using python with arcmap open and you have&amp;nbsp; geoprocessing options set to add results to the display toggled on.&lt;/P&gt;&lt;P&gt;Now, that should be a start, but the process you are using will dictate other options.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Nov 2015 08:52:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18312#M977</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-11-14T08:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: Add data into ArcMap from geodatabase using Python</title>
      <link>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18313#M978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/make-feature-layer.htm" title="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/make-feature-layer.htm"&gt;Make Feature Layer—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp; (Dan provided the Pro version)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P style="font-size: 0.875rem; margin-bottom: 1.71429em;"&gt;Creates a &lt;SPAN class="glossary"&gt;feature layer&lt;/SPAN&gt; from an input &lt;SPAN class="glossary"&gt;feature class&lt;/SPAN&gt; or &lt;SPAN class="glossary"&gt;layer&lt;/SPAN&gt; file. The layer that is created by the tool is temporary and will not persist after the session ends unless the layer is saved to disk or the map document is saved.&lt;/P&gt;&lt;P style="font-size: 0.875rem; margin-bottom: 1.71429em;"&gt;....&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 0.875rem; margin-bottom: 1.71429em;"&gt;Layers created in ArcCatalog cannot be used in ArcMap unless they are saved to a layer file using the &lt;A class="xref" href="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/save-to-layer-file.htm" style="color: #007ac2;"&gt;Save To Layer File&lt;/A&gt; tool.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The help page includes some sample code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Nov 2015 14:16:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18313#M978</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-11-14T14:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Add data into ArcMap from geodatabase using Python</title>
      <link>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18314#M979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To add to the above responses, below is how this would look in the code. The workflow will vary depending on if you're executing the code in-process or out-of-process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Option A : When&amp;nbsp; you're executing code in-process #
import arcpy

# Use this line if you're not sure if it's already true
arcpy.env.addOutputsToMap = True 

# Executing tool will automatically add layer to map
arcpy.management.MakeFeatureLayer(r"Path\To\GDB\FeatureClass", "NameForLayer") 

# Option B : When you're executing code out-of-process #
import arcpy
# Hook into the map document
mxd = arcpy.mapping.MapDocument(r"Path\To\MapDocument")

# Hook into the data frame where you want to add the layer
df&amp;nbsp; = arcpy.mapping.ListDataFrames(mxd)[0]

# Create a Layer object
lyr = arcpy.management.MakeFeatureLayer(r"Path\To\GDB\FeatureClass", "NameForLayer").getOutput(0)

# Add the layer object to the map
arcpy.mapping.AddLayer(df, lyr)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Add Layer&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fdesktop.arcgis.com%2Fen%2Fdesktop%2Flatest%2Fanalyze%2Farcpy-mapping%2Faddlayer.htm" target="_blank"&gt;http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/addlayer.htm&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:44:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18314#M979</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2021-12-10T20:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Add data into ArcMap from geodatabase using Python</title>
      <link>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18315#M980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MakeFeatureLayer is giving an error:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Input Features: Dataset ...\unified.gdb\feature21 does not exist or is not supported&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 23:38:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18315#M980</guid>
      <dc:creator>MarcelAfif</dc:creator>
      <dc:date>2015-11-16T23:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Add data into ArcMap from geodatabase using Python</title>
      <link>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18316#M981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Are you able to navigate to add this feature class manually in ArcMap?&lt;/P&gt;&lt;P&gt;2. If yes, could you show me the full path to the data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 23:44:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18316#M981</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2015-11-16T23:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Add data into ArcMap from geodatabase using Python</title>
      <link>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18317#M982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it's in &lt;STRONG&gt;C:\Users\Marcel\Documents\ArcGIS\scratch\unified.gdb\feature21&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;unified.gdb&lt;/EM&gt; looks like a folder from the outside, but when I open it, it has all these files with weird extensions (&lt;EM&gt;.gdbtable&lt;/EM&gt;, &lt;EM&gt;.gdbindexes&lt;/EM&gt;, &lt;EM&gt;.gdbtblx&lt;/EM&gt;, etc.). I know, must be one of these two, file database or personal database, just don't know which one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 19:04:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18317#M982</guid>
      <dc:creator>MarcelAfif</dc:creator>
      <dc:date>2015-11-17T19:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Add data into ArcMap from geodatabase using Python</title>
      <link>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18318#M983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you get if you run the following command?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.Exists(r"&lt;SPAN style="font-weight: bold; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;C:\Users\Marcel\Documents\ArcGIS\scratch\unified.gdb\feature21")&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 21:20:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18318#M983</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2015-11-17T21:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Add data into ArcMap from geodatabase using Python</title>
      <link>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18319#M984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apparently I wasn't using the "r", so it was giving me False at first. I was able to add the data, thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 21:24:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/add-data-into-arcmap-from-geodatabase-using-python/m-p/18319#M984</guid>
      <dc:creator>MarcelAfif</dc:creator>
      <dc:date>2015-11-17T21:24:24Z</dc:date>
    </item>
  </channel>
</rss>

