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, 2014No Product Found
Bug ID Number
NIM003263
Submitted
July 6, 2006
Last Modified
June 5, 2024
Applies to
No Product Found
Version found
9.1
Status
Non-Reproducible
This issue was not reproducible when tested by the development team. Issues may be given this status when they cannot be reproduced or are no longer relevant in a development version of the software, but a specific fix was not installed to address the issue. The issue's Additional Information section may contain further explanation.
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>"=====================