USForestServiceAdmin

IDataset.Rename

Discussion created by USForestServiceAdmin on Feb 13, 2012
Latest reply on Feb 15, 2012 by USForestServiceAdmin
Hello all,

I am using the following code to rename a dataset.  It gives me an error stating:

The method or operation is not implemented

Any ideas on what's wrong?

Thanks in advance...

        Try

            'Now loop through all the layers in the TOC, rename them appropriately
            pMxDoc = My.ArcMap.Document
            pMap = pMxDoc.FocusMap
            Dim pNewEnumLayer As IEnumLayer = Nothing
            pNewEnumLayer = pMap.Layers
            pLayer = Nothing
            pDS = Nothing
            pLayer = pNewEnumLayer.Next
            Do Until pLayer Is Nothing
                If pLayer.Name = m_pFLayer.Name Then
                    pDS = CType(pLayer, IDataset)
                    pDS.Rename("rev_elim_output")
                End If
                pLayer = pNewEnumLayer.Next
            Loop


        Catch ex As Exception
            MsgBox(ex.StackTrace)
            MsgBox(ex.Message)
        End Try

Outcomes