Removing shapefile .lock files (ed, rd, and sr) in ArcGIS Pro

644
0
01-06-2017 09:29 AM
Highlighted
Occasional Contributor

I am migrating an application from ArcObjects that allows a user to define a polygon which is then written to a shapefile. This process can happen numerous times in a session, requiring the shapefile to be deleted and then re-created.  In the ArcObjects version of the application, I am able to remove the shape file and create another. I use the IFeatureWorkspaceManage interface with the DeleteByName passing in the DatasetName and am able to delete and re-create the shapefile as necessary.

(pWorkspaceManage.DeleteByName(pDatasetname);

 

In the Pro version I remove the shapefile from the Map and then try to remove the shapefile files but am unable due to the .lock files.

I need to know the equivalent mechanism in ArcGIS Pro sdk to allow for same shapefile name creation and removal in an ArcGIS Pro session. Any assistance would be appreciated.

Thanks

0 Kudos
0 Replies