I have a file geodatabase which includes a lot of feature datasets and each feature dataset has lots of Features. I am going to do clipping through all the Features using ArcPy Code. However, the clipped Features are created in the same feature datsets. I would like to know how I can chnage this script to have a new FGDB with the same feature datasets but just include the clipped Features.

2 Answers
2

Looks like you have some indentation issues in your code-snippet, else statement should be aligned with the if statement. As far as creating the geodatabase and feature datasets you may use these arcpy methods:

Within your logic before you create the geodatabase and feature dataset in your destination geodatabase you will want to include the Exists method to evaluate if these files exist already or not. You may also want to consider using Walk to better traverse through the source geodatabase to pull out feature dataset names to hold as a variable for creation of new feature datasets in destination geodatabase.