Using Python to create a number of features (specifically using Copy Feature on a newly created set of joined tables) that will be available in both the Catalog and the Table of Contents.
Basically asking if there is a Python command / geoprocessing tool that will make a feature that exists in the Catalog also available in the Table of Contents without having to manually add it to the map.
Solved! Go to Solution.
The Copy Feature works and creates the feature in the Catalog.
When using Copy Features, nothing "creates the feature in the Catalog." The output of Copy Features is created in a folder or geodatabase somewhere. If the folder or geodatabase location has been added to an ArcGIS Pro project, you can see the new data in Catalog, but this is Pro viewing data that exists and not having something created for it.
If you want to add newly created data sets to a Pro project, you can use the following code to start experimenting:
import arcpy
aprx_path = # path to ArcGIS Pro project file
data_path = # path to newly created data set to add to a map in Pro
aprx = arcpy.mp.ArcGISProject(aprx_path)
map = aprx.listMaps()[0] # this assume you want data added to first map
map.addDataFromPath(data_path)
aprx.save()
The Copy Feature works and creates the feature in the Catalog.
When using Copy Features, nothing "creates the feature in the Catalog." The output of Copy Features is created in a folder or geodatabase somewhere. If the folder or geodatabase location has been added to an ArcGIS Pro project, you can see the new data in Catalog, but this is Pro viewing data that exists and not having something created for it.
If you want to add newly created data sets to a Pro project, you can use the following code to start experimenting:
import arcpy
aprx_path = # path to ArcGIS Pro project file
data_path = # path to newly created data set to add to a map in Pro
aprx = arcpy.mp.ArcGISProject(aprx_path)
map = aprx.listMaps()[0] # this assume you want data added to first map
map.addDataFromPath(data_path)
aprx.save()