I am currently creating a script for ArcMap that will create a file geodatabase and then two feature class datasets to store feature classes that the script also outputs. At the moment, I can get the script to create the file geodatabase and save the outputs into it. However, if I try and alter the script to save the feature classes into the created feature datasets, I get the "ERROR 000210: Cannot create output".
Is this because the feature datasets are locked and therefore the feature classes cannot be outputted to them?
I am bit flummoxed in what the issue could be. I have copied a snippet below.
#This is the snippet. Certain aspects of the script are set by the user as parameters.
#The entire script is encased within a try statement hence the indention.
# create the gdb
ztv_path = os.path.join(GISFolder, "Databases") # location of the geodatabase. The GISFolder is a parameter that is inputted
ztv_name = "ZTV" # name of the geodatabase
# Execute Creategdb
arcpy.CreateFileGDB_management(ztv_path, ztv_name)
ztvgdb = os.path.join(GISFolder, "Databases", "ZTV.gdb")
# ---------------------------------------------------------------------------------------
# Set the link to the ZTV gdb and then create the feature datasets#
dataset_outpath = os.path.join (GISFolder,"Databases","ZTV.gdb") # location of the geodatabase to create the datasets in
temp_name = "ZTV_Temp" #name for the temp dataset
output_name = "ZTV_Output" #name for the output dataset
# Execute Createfeaturedataset
arcpy.CreateFeatureDataset_management (dataset_outpath,temp_name,bng)
arcpy.CreateFeatureDataset_management (dataset_outpath,output_name,bng)
ztvOutput = os.path.join(ztvgdb, "ZTV_Ouputs")
ztvTemp = os.path.join(ztvgdb, "ZTV_Temps")
# create the study area for the script.
# This is the part where the script fails and I recieve the Error
searchArea = os.path.join(ztvgdb,ztvTemp, "studyArea")
# Buffer...
arcpy.Buffer_analysis(inLocation, searchArea, "1000 Meters", "", "", "ALL")
arcpy.MakeFeatureLayer_management(searchArea, "searchArea_lyr")
-
Does you path have a number or dot involved? gis.stackexchange.com/questions/422311/…Mapperz– Mapperz ♦2022年04月07日 20:29:42 +00:00Commented Apr 7, 2022 at 20:29
-
1I don't think your code snippet fully qualifies as one. Have you tried running yours exactly as presented?PolyGeo– PolyGeo ♦2022年04月10日 09:02:16 +00:00Commented Apr 10, 2022 at 9:02