0

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")
PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Apr 7, 2022 at 13:54
2
  • Does you path have a number or dot involved? gis.stackexchange.com/questions/422311/… Commented Apr 7, 2022 at 20:29
  • 1
    I don't think your code snippet fully qualifies as one. Have you tried running yours exactly as presented? Commented Apr 10, 2022 at 9:02

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.