Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

How can I merge an entire Geodatabase in the ESRI (ArcView) ModelBuilder? I have several FeatureClasses created into the GDB and in the model I plan to merge them all. Right now I have imported all the FCs by hand into the Model. This is not the solution I am aiming for because the names and the amount of FCs could vary.

share|improve this question
    
Use Append (Data Management) resources.arcgis.com/en/help/main/10.1/index.html#//… and the NO_TEST option –  Mapperz Jul 31 '12 at 13:25
    
This doesn't work out. I still have to select all including FCs manually. –  ChristianFu Jul 31 '12 at 13:43

2 Answers 2

You can accomplish this using this python script, here is the syntax:

import arcpy
from arcpy import env
env.workspace = "C:\\temp\\test.gdb"
fcList = arcpy.ListFeatureClasses('','')
arcpy.Merge_management(fcList, "Merge")

Just change the env workspace to match your geodatabase path.

share|improve this answer
    
Using the List function will do the trick. Is there a way to use the Batch functionallity of a tool in ModelBuilder? –  dchaboya Jul 31 '12 at 22:17
    
@dohaboya, Yes, the merge tool can be run in batch mode. Right click the input feature cell and select 'Insert values from a table'. –  artwork21 Aug 1 '12 at 11:05

You can Batch this process by creating an Input Table. This will allow you to load as many FCs as you like. It would probably be beneficial if they are all located in the same directory.

share|improve this answer
1  
As far as I know this makes the Merge tool run n times, when I have n files. I want to run merge only one time, to merge all n files. –  ChristianFu Aug 6 '12 at 8:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.