Пример #1
0
def count_r2d2_wap(state_of_interest):
    p_workspace = MC.get_r2d2_prod_workspace(state_of_interest)
    arcpy.env.workspace = p_workspace
    p_wap = ['NISOURCE.GPSWorkAreaPolygon']
    p_dict = CC.count_list_fcs(p_wap, C4.count_r2d2_fc_state)

    return p_dict
# start of program
#
print str(datetime.datetime.now())

# ArcFM licensing
import win32com.client

app = win32com.client.Dispatch("Miner.Framework.Dispatch.MMAppInitializeDispatch")
runtime = win32com.client.Dispatch("Miner.Framework.Dispatch.MMRuntimeEnvironmentDispatch")
au = win32com.client.Dispatch('Miner.Framework.Dispatch.MMAutoupdaterDispatch')
runtime.RuntimeMode = 0x4  # mmRuntimeModeArcServer
app.Initialize(0x5)
au.AutoUpdaterMode = 0x8
# end ArcFm licensing

states = ["OH"]

for state in states:
    print state
    # r2d2_preprod = mc.get_r2d2_preprod_workspace(state)
    # delete_fcs(r2d2_preprod)
    r2d2_prod = mc.get_r2d2_prod_workspace(state)
    delete_fcs(r2d2_prod)

app.Shutdown

del app, runtime, au

print str(datetime.datetime.now())
Пример #3
0
def copy_prod(log_name, state_of_interest):
    p_workspace = MC.get_prod_workspace()
    r2d2_prod = MC.get_r2d2_prod_workspace(state_of_interest)

    copy_gps(log_name, p_workspace, r2d2_prod, state_of_interest)
# start of program
#
print str(datetime.datetime.now())

# ArcFM licensing
import win32com.client

app = win32com.client.Dispatch("Miner.Framework.Dispatch.MMAppInitializeDispatch")
runtime = win32com.client.Dispatch("Miner.Framework.Dispatch.MMRuntimeEnvironmentDispatch")
au = win32com.client.Dispatch('Miner.Framework.Dispatch.MMAutoupdaterDispatch')
runtime.RuntimeMode = 0x4  # mmRuntimeModeArcServer
app.Initialize(0x5)
au.AutoUpdaterMode = 0x8
# end ArcFm licensing

r2d2_prod = MC.get_r2d2_prod_workspace('VA')
print r2d2_prod
arcpy.env.workspace = r2d2_prod

# fc = r"NISOURCE.GPS_GasValve"

# oidValueList = [r[0] for r in arcpy.da.SearchCursor(fc, ["OID@"])]
# oidValueList.sort()

# where = """"OBJECTID" >= {0}"""

for fc in MC.get_gps_fcs(r2d2_prod):
    delete_fc(r2d2_prod, fc)

delete_fc(r2d2_prod, "NISOURCE.GPSWorkAreaPolygon")