Is there a way to create a Feature Class in 'memory' directly into an existing Group Layer without having to manually move the Feature Layer?

610
2
05-30-2023 10:14 AM
diegom_geoowl
New Contributor III

As of right now I'm using the Geoprocessing.ExecuteToolAsync() method and the "CreateFeatureclass_management" tool to create a feature class in memory passing in 'memory' as the path. The issue is that I can't seem to find a way to create a feature layer in memory directly into an existing group layer. I have to manually move it into the group layer using MapView.Active.Map.MoveLayer() method passing in the newly created feature layer and the existing group layer.

0 Kudos
2 Replies
CharlesMacleod
Esri Regular Contributor

CreateFeatureclass_management adds content to the map via the "Add output datasets to an open map" setting I believe. I did not see an option anywhere to specify a layer as a target. Perhaps confirm with the GP team? https://community.esri.com/t5/geoprocessing-questions/bd-p/geoprocessing-questions

0 Kudos
diegom_geoowl
New Contributor III

Thank you I will!😁

 

0 Kudos