Select to view content in your preferred language

convert 100 GDB to shapefiles

82
3
Thursday
MohamedIsmael
Occasional Contributor

I have 100 GDB have many feature class, i want to convert features class in these GDBs to shapefiles.
I need a workflow do this task quickly using modelbuilder
so is there a way to do this?

0 Kudos
3 Replies
BobBooth1
Esri Regular Contributor

You could make a model with an iterator (iterate feature classes) to iterate over all the feature classes in one geodatabase, set it up with input and output parameters (input p= GDB name; output p = folder for shapefiles), making a model tool. Then, once you got that working correctly on a single GDB, you could embed that tool in another model, using another iterator to iterate over the geodatabases and process each in turn.

See:

https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/create-a-model-too...

https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/working-with-itera...

https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/iterators-for-loop...

https://pro.arcgis.com/en/pro-app/latest/tool-reference/modelbuilder-toolbox/iterate-feature-classes...

https://pro.arcgis.com/en/pro-app/latest/tool-reference/modelbuilder-toolbox/iterate-workspaces.htm

https://pro.arcgis.com/en/pro-app/latest/tool-reference/modelbuilder-toolbox/examples-of-using-itera...

You could also do this with Python, see this tutorial as an example of processing all of the feature classes in a geodatabase.

https://learn.arcgis.com/en/projects/automate-a-geoprocessing-workflow-with-python/

 

MohamedIsmael
Occasional Contributor

HI  BobBooth1
i created two models
-Main Model => contain Iterate Workspaces + Sub model
- Sub model => contain Iterate Feature Classes + Copy features
the final output cretae only one feature class from each DB
output of copy features => test_%Name%_%Name (2)% to take name of the DB and Feature class but the final output cretae only one feature class from each DB

 

 

0 Kudos
BobBooth1
Esri Regular Contributor

I think you are on the right track - if you are only getting one output from each GDB I suspect that the name is always the same, and each feature class is exported with that name, overwriting the previous one.

That suggests that the inline variable substitution is failing in some way.

I would rename the variables to something like Wname and FCname. You may need to use Calculate Value (https://pro.arcgis.com/en/pro-app/3.4/tool-reference/modelbuilder-toolbox/calculate-value.htm) to concatenate the two variables into a third to use in the output feature class name.

You can use a precondition (https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/using-precondition...to ensure the calculation occurs before the export step.

0 Kudos