AnsweredAssumed Answered

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

Question asked by tomas1 on Jan 6, 2017

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

Outcomes