lstFC = [r"E:\05 CCAMLR GIS\Circumpolar_shapefiles\Benthic_regionalisation_DelCano_Crozet_level2.shp"]
home2 = os.path.dirname(os.path.dirname(sys.argv[0])).replace("\\","/") domain = os.path.basename(home) arcpy.AddWarning(domain) basews = home+"/base.gdb" scratchws = home+"/scratch.gdb"
try: lay = arcpy.mapping.ListLayers(mxd,"Domain")[0] if lay.supports("DATASOURCE"): source = lay.dataSource home = os.path.dirname(os.path.dirname(source)).replace("\\","/") except : if source: home = os.path.dirname(os.path.dirname(source)).replace("\\","/") else: arcpy.AddError("Domain layer missing in MXD, cannot find Domain location") sys.exit()
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.