I am trying to remove a join in arcpy and have been all over the forums and help topics but cannot get my script to remove the join.
I have tried many combinations of inputs to the remove join but to no avail.
Name94 = "C:\\a\\b\\c\\input1.shp"
Name95 = "C:\\a\\b\\c\\input2.shp"
arcpy.MakeFeatureLayer_management(Name94, TablesView)
arcpy.AddJoin_management(TablesView, "Buf_Units", Name95, "Units", "KEEP_ALL")
arcpy.CalculateField_management(TablesView, "Buf_Area", "[Area]", "VB", "")
arcpy.RemoveJoin_management(TablesView, "Buf_Units")
This yields the error:
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000800: The value is not a member of | Input2.
Failed to execute (RemoveJoin).
In place of buf_units I have tried (with various error messages):
arcpy.RemoveJoin_management(TablesView, "'"+Name95.rstrip(".shp")+"'")
arcpy.RemoveJoin_management(TablesView)
arcpy.RemoveJoin_management(TablesView, "input2")
arcpy.RemoveJoin_management(TablesView, Name95)
arcpy.RemoveJoin_management(TablesView, "input2")
I am running python 2.7, 64bit, 10.1 arcgis
Aucun commentaire:
Enregistrer un commentaire