Skip to content

Commit

Permalink
Updates to Delete ACO & ATO Scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
adgiles committed Sep 8, 2016
1 parent d7214d0 commit 8ce988c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
12 changes: 5 additions & 7 deletions tools/scripts/delete_entires_from_ACO_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,33 @@
targetWS = arcpy.GetParameterAsText(0)

AMS_Id = arcpy.GetParameterAsText(1)
if AMS_Id == '#' or not AMS_Id:
AMS_Id = "%%" # provide a default value if unspecified

# Process: Make Table View
arcpy.MakeTableView_management("%s/AirC2_AMS_RECORD" % (targetWS), "AMS_RECORD_FILTER", "AMSID like '%AMS Id%'", "", "")
arcpy.MakeTableView_management("%s/AirC2_AMS_RECORD" % (targetWS), "AMS_RECORD_FILTER", "AMSID like '" + AMS_Id + "'", "", "")

# Process: Delete Rows
arcpy.DeleteRows_management("AMS_RECORD_FILTER")

# Process: Make Table View
arcpy.MakeTableView_management("%s/AirC2_ACO_POLYGON" % (targetWS), "AMS_POLYGON_FILTER", "AMSID like '%AMS Id%'", "", "")
arcpy.MakeTableView_management("%s/AirC2_ACO_POLYGON" % (targetWS), "AMS_POLYGON_FILTER", "AMSID like '" + AMS_Id + "'", "", "")

# Process: Delete Rows
arcpy.DeleteRows_management("AMS_POLYGON_FILTER")

# Process: Make Table View
arcpy.MakeTableView_management("%s/AirC2_ACO_PERIOD" % (targetWS), "AMS_ORDER_PERIOD_FILTER", "AMSID like '%AMS Id%'", "", "")
arcpy.MakeTableView_management("%s/AirC2_ACO_PERIOD" % (targetWS), "AMS_ORDER_PERIOD_FILTER", "AMSID like '" + AMS_Id + "'", "", "")

# Process: Delete Rows
arcpy.DeleteRows_management("AMS_ORDER_PERIOD_FILTER")

# Process: Make Table View
arcpy.MakeTableView_management("%s/AirC2_ACO_LINE" % (targetWS), "AMS_ORDER_LINE_FILTER", "AMSID like '%AMS Id%'", "", "")
arcpy.MakeTableView_management("%s/AirC2_ACO_LINE" % (targetWS), "AMS_ORDER_LINE_FILTER", "AMSID like '" + AMS_Id + "'", "", "")

# Process: Delete Rows
arcpy.DeleteRows_management("AMS_ORDER_LINE_FILTER")

# Process: Make Table View
arcpy.MakeTableView_management("%s/AirC2_ACO_POINT" % (targetWS), "ACO_POINT_FILTER", "AMSID like '%AMS Id%'", "", "")
arcpy.MakeTableView_management("%s/AirC2_ACO_POINT" % (targetWS), "ACO_POINT_FILTER", "AMSID like '" + AMS_Id + "'", "", "")

# Process: Delete Rows
arcpy.DeleteRows_management("ACO_POINT_FILTER")
Expand Down
10 changes: 4 additions & 6 deletions tools/scripts/delete_entires_from_ATO_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,24 @@
import arcpy

# Script arguments
Target_Workspace = arcpy.GetParameterAsText(0)
targetWS = arcpy.GetParameterAsText(0)

AMS_Id = arcpy.GetParameterAsText(1)
if AMS_Id == '#' or not AMS_Id:
AMS_Id = "%%" # provide a default value if unspecified

# Process: Make Table View
arcpy.MakeTableView_management("%s/AirC2_ATO_MISSION" % (targetWS, "ATO_POINT_FILTER", "AMSID like '%AMS Id%'", "", "")
arcpy.MakeTableView_management("%s/AirC2_ATO_MISSION" % (targetWS), "ATO_POINT_FILTER", "AMSID like '" + AMS_Id + "'", "", "")

# Process: Delete Rows
arcpy.DeleteRows_management("ATO_POINT_FILTER")

# Process: Make Table View
arcpy.MakeTableView_management("%s/AirC2_ATO_GENTEXT" % (targetWS), "ATO_GENTEXT_FILTER", "AMSID like '%AMS Id%'", "", "")
arcpy.MakeTableView_management("%s/AirC2_ATO_GENTEXT" % (targetWS), "ATO_GENTEXT_FILTER", "AMSID like '" + AMS_Id + "'", "", "")

# Process: Delete Rows
arcpy.DeleteRows_management("ATO_GENTEXT_FILTER")

# Process: Make Table View
arcpy.MakeTableView_management("%s/AirC2_ATO_MISSION_BRIEFING" % (targetWS), "ATO_BRIEFING_FILTER", "AMSID like '%AMS Id%'", "", "")
arcpy.MakeTableView_management("%s/AirC2_ATO_MISSION_BRIEFING" % (targetWS), "ATO_BRIEFING_FILTER", "AMSID like '" + AMS_Id + "'", "", "")

# Process: Delete Rows
arcpy.DeleteRows_management("ATO_BRIEFING_FILTER")
Expand Down

0 comments on commit 8ce988c

Please sign in to comment.