laptop and a wrench

Bug

Using IDataset::Delete on a TIN after using IMap::DeleteLayer will result in a file share violation error, but then partially delete the TIN from the disk.

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM003263
SubmittedJuly 6, 2006
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.1
StatusNon-Reproducible

Additional Information

No Public Explanation

Workaround

Instead of using IMap::DeleteLayer use IRemoveLayerOperation instead.==========================Sub RemoveLayer()Dim pMxDoc As IMxDocumentDim pMap As IMapDim pLayer As ILayerDim pRemoveLayerOperation As IRemoveLayerOperationDim pOp As IOperationSet pMxDoc = ThisDocumentSet pMap = pMxDoc.FocusMapSet pLayer = pMap.Layer(0)Set pRemoveLayerOperation = New RemoveLayerOperationpRemoveLayerOperation.Map = pMappRemoveLayerOperation.Layer = pLayerSet pOp = pRemoveLayerOperation<a href="http://pOp.Do" target="_blank">pOp.Do</a>pMxDoc.ActiveView.RefreshEnd Sub===========================***Or****Delete the layer with the geoprocessor Delete (Management) tool.=====================Dim gp As ObjectSet gp = CreateObject("esrigeoprocessing.gpdispatch.1")gp.AddToolbox "<a href="file:C:/program" target="_blank">C:\program</a> files\arcgis\arctoolbox\toolboxes\data management tools.tbx"gp.Delete_management "<a href="file:c:/temp/tin" target="_blank">c:\temp\tin</a>", "<a href="file:C:/Temp/tin" target="_blank">C:\Temp\tin</a>"=====================

Steps to Reproduce

Bug ID: NIM003263

Software:

  • No Product Found

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options