I'm working with SDE layers in arcmap. trying to avoid pointing to the sde file itself. I've tried workspace.Pathname, it was empty for sde remote workspace. I've also tried IName from workspace, empty again. Any ideas on what I should be doing differently? BTW, it works just fine for GDBs.

        Dim gputilities As ESRI.ArcGIS.Geoprocessing.IGPUtilities = New ESRI.ArcGIS.Geoprocessing.GPUtilitiesClass()
        'Dim inputTableA As IDETable = CType(gputilities.MakeDataElement(pWorkspace.PathName + "\Weld", Nothing, Nothing), IDETable)
        Dim inputtables As IArray = New ArrayClass()
        Dim gpValueTableObj As ESRI.ArcGIS.Geoprocessing.GpValueTableObject = New ESRI.ArcGIS.Geoprocessing.GpValueTableObject
        Dim pdet As IDETable = New DETable
        For Each pLayer In checkedLayers
                Dim workspaceFactory As SdeWorkspaceFactory = New SdeWorkspaceFactoryClass()
                Dim workspaceName As IWorkspaceName = workspaceFactory.Create(Nothing, pLayer, pWorkspace.ConnectionProperties, 0)
                Dim pName As IName = TryCast(workspaceName, IName)
                inputtables.Add(CType(gputilities.MakeDataElementFromNameObject(pName), IDETable))

            Catch ex As Exception
            End Try
            'inputtables.Add(CType(gputilities.MakeDataElement(weldLayer.Name, Nothing, Nothing), IDETable))
        fieldmapping = New ESRI.ArcGIS.Geoprocessing.GPFieldMappingClass()
        fieldmapping.Initialize(inputtables, Nothing)
  • Anyone who has any code to do field mapping with SDE layers in ArcMap, I will take it. – Garima V Sep 17 '14 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.