Select to view content in your preferred language

AddJoin is not working with inmemory feature class

189
0
10-08-2024 03:24 PM
Alok_Shah
New Contributor

Hi,

My addjoin code is working fine when I provide the feature class with filegdb. Here is the code.

 

        out_directions_points_fc=os.path.join('D:\Workspace\PythonToolbox\Default.gdb', 'DirectionPoints')
        out_directions_lines_fc=os.path.join('D:\Workspace\PythonToolbox\Default.gdb', 'DirectionLines')

result = route.solve()

# exportng for out put. in case of failour it will be schema only
result.export(arcpy.nax.RouteOutputDataType.DirectionLines, out_directions_lines_fc)
                result.export(arcpy.nax.RouteOutputDataType.DirectionPoints, out_directions_points_fc)

arcpy.MakeFeatureLayer_management(out_directions_lines_fc, "lines_layer")
                    arcpy.MakeFeatureLayer_management(out_directions_points_fc, "points_layer")

arcpy.management.AddJoin("lines_layer", "DirectionPointID", "points_layer", "ObjectID", "KEEP_ALL", "INDEX_JOIN_FIELDS")

 

When I am using the in memory database it's giving me error.

 

self.out_gdb_workspace="memory"

out_directions_points_fc=os.path.join(self.out_gdb_workspace, 'DirectionPoints')
out_directions_lines_fc=os.path.join(self.out_gdb_workspace, 'DirectionLines')

# same as above code


Getting below error.
ERROR : ExecuteError Errors:ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds.
Failed to execute (AddJoin).

Logs:

DEBUG : D:\Workspace\PythonToolbox\Default.gdb\DirectionLines
DEBUG : D:\Workspace\PythonToolbox\Default.gdb\DirectionPoints

DEBUG : memory\DirectionLines
DEBUG : memory\DirectionPoints

0 Kudos
0 Replies