Hello,
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
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 + "..." )
arcpy.management.SelectLayerByLocation(lyr, "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 = arcpy.mp.ArcGISProject("CURRENT")
mp = aprx.activeMap
mp.addDataFromPath(fgdb + "\\" + e + "_buffer")
aprx = arcpy.mp.ArcGISProject(aprxloc)
mp = aprx.listMaps("Map")[0]
limerge.append(os.path.join(fgdb,e+ "_buffer"))
Thanks,