<?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 file geodatabase feature class to map using command line tool in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/add-file-geodatabase-feature-class-to-map-using/m-p/1362828#M76613</link>
    <description>&lt;P&gt;I am trying to create a map automation tool using Python from the command line where I pull data from a web URL, add the data as a feature class, edit the symbology, and then export as a map .png file.&lt;BR /&gt;&lt;BR /&gt;I am able to pull in the data, create a feature class using&amp;nbsp;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.management.CreateFeatureclass( ), add fields to the feature class using&amp;nbsp;arcpy.management.AddField( ), and&amp;nbsp;Insert the data into the feature class with&amp;nbsp;arcpy.da.InsertCursor( ).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The file geodatabase feature class is showing up in the specified geodatabase within my ArcGIS Pro project, but the data is NOT being added to the map. I can manually select "Add to Current Map" but would like to automate this process. Any help would be great! When I run the same code using ArcGIS Pro's Python window, the feature class is automatically added as a Layer to the map so I am stumped as to why it is not adding it through Command Prompt (note: I am not looking to create a separate Layer file, the same issue occurs)&lt;/P&gt;</description>
    <pubDate>Tue, 19 Dec 2023 21:31:09 GMT</pubDate>
    <dc:creator>EmilyShallow</dc:creator>
    <dc:date>2023-12-19T21:31:09Z</dc:date>
    <item>
      <title>Add file geodatabase feature class to map using command line tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/add-file-geodatabase-feature-class-to-map-using/m-p/1362828#M76613</link>
      <description>&lt;P&gt;I am trying to create a map automation tool using Python from the command line where I pull data from a web URL, add the data as a feature class, edit the symbology, and then export as a map .png file.&lt;BR /&gt;&lt;BR /&gt;I am able to pull in the data, create a feature class using&amp;nbsp;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.management.CreateFeatureclass( ), add fields to the feature class using&amp;nbsp;arcpy.management.AddField( ), and&amp;nbsp;Insert the data into the feature class with&amp;nbsp;arcpy.da.InsertCursor( ).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The file geodatabase feature class is showing up in the specified geodatabase within my ArcGIS Pro project, but the data is NOT being added to the map. I can manually select "Add to Current Map" but would like to automate this process. Any help would be great! When I run the same code using ArcGIS Pro's Python window, the feature class is automatically added as a Layer to the map so I am stumped as to why it is not adding it through Command Prompt (note: I am not looking to create a separate Layer file, the same issue occurs)&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 21:31:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/add-file-geodatabase-feature-class-to-map-using/m-p/1362828#M76613</guid>
      <dc:creator>EmilyShallow</dc:creator>
      <dc:date>2023-12-19T21:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Add file geodatabase feature class to map using command line tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/add-file-geodatabase-feature-class-to-map-using/m-p/1363015#M76614</link>
      <description>&lt;P&gt;You need to get a reference to the map and use the addLayer method or the addDataFromPath method (see code samples at the end of this help topic, linked below).&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.1/arcpy/mapping/map-class.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/3.1/arcpy/mapping/map-class.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you're running from within Pro you can use the "CURRENT" keyword to reference the map, otherwise you can provide a path to the aprx file.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 14:34:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/add-file-geodatabase-feature-class-to-map-using/m-p/1363015#M76614</guid>
      <dc:creator>BobBooth1</dc:creator>
      <dc:date>2023-12-20T14:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Add file geodatabase feature class to map using command line tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/add-file-geodatabase-feature-class-to-map-using/m-p/1365580#M76871</link>
      <description>&lt;P&gt;Thanks for the suggestion! I do provide a path to the aprx file and set a path to output the feature class. The feature class is correctly being added to the file geodatabase within the ArcGIS Pro Project, it is just not automatically adding the data to the map as it does when I run the same code within Pro.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 21:01:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/add-file-geodatabase-feature-class-to-map-using/m-p/1365580#M76871</guid>
      <dc:creator>EmilyShallow</dc:creator>
      <dc:date>2024-01-02T21:01:37Z</dc:date>
    </item>
  </channel>
</rss>

