I am trying to create file geodatabase and create a mosaic dataset; however I do know that creating a file geodatabase works but the mosaic dataset is not...
I think there must be a way to force the dataset within the file geodatabase but it is blocking me ?
Take a look at my codes
Thanks.
################################################################################
# CREATE FILE GEODATABASE AND THEN CREATE MOSAIC DATASET #
################################################################################
# Name: CreateFileGDB_Example2.py
# Description: Create a file GDB
# Import system modules
import arcpy
# Set local variables
out_folder_path = "C:/workspace"
out_name = "test.gdb"
# Execute CreateFileGDB
Test = arcpy.CreateFileGDB_management(out_folder_path, out_name)
# Creating new Mosaic Dataset within Existing File Geodatbase
# Set NAD 1983 UTM Zone 13N
sr = arcpy.SpatialReference(26913)
mdname = "/SeeIfThisWorks"
try:
# To see if the file exists or not
Test = arcpy.CreateFileGDB_management(out_folder_path, out_name)
#Then create the file
mdname= arcpy.CreateMosaicDataset_management(out_folder_path,Test,mdname)
except:
str = "Your Mosaic Dataset" +str2+"" "is done created"
str2 = "Test"
print str + str2