AnsweredAssumed Answered

Work around for using output memory\ with a domain.

Question asked by deleted-user-yC5VkbyXzrQR on Nov 18, 2019
Latest reply on Nov 19, 2019 by bixb0012



My script is failing because I'm trying to output a feature class that has domains into memory. Is there any work around for this yet? 


You can ignore all the other code its just line 10 that fails. It works with any other feature except ones that have a domain. I'm pretty sure that is why the script fails. 


  ERROR 000210: Cannot create output memory\queryResidentsBuildings


#This "for loop" is used for preset layers in the APRX. 
if li != [""]:      
    for item in li:
        q = item.split(" ", 1)[0] 
        w = item.split(" ", 1)[1] 
        w = w.strip("\'")  
        lyr = mp.listLayers(q)[0]
        arcpy.AddMessage("Buffering "+ q + "..." ), "INTERSECT", "AOI", "200 Meters", "NEW_SELECTION", "NOT_INVERT")
        arcpy.CopyFeatures_management(lyr,r"memory\query"+ q)
        e = q + w.split(" ", 1)[0] + w.split(" ", 1)[1]
        arcpy.analysis.Buffer(r"memory\query"+ q, e+ "_buffer" , w, "FULL", "ROUND", "ALL", None, "PLANAR")
        aprx ="CURRENT")
        mp = aprx.activeMap
        mp.addDataFromPath(fgdb + "\\" + e + "_buffer")
        aprx =
        mp = aprx.listMaps("Map")[0]
        limerge.append(os.path.join(fgdb,e+ "_buffer"))