Select to view content in your preferred language

Model builder: iterations in different databases

1653
4
05-20-2014 06:37 AM
by Anonymous User
Not applicable
Original User: Masare2

Hi, this is the starting point:
I have one folder containing various folders, each of those contain a database, each database contain few feature classes.
I need to perform a double projection ( froma A to B and from B to C) of all the feature classes, but I want to keep the starting folder structure
I had to perform the same process with some rasters (but all in the same folder) and the model worked perfectly.
I have prepared a similar model for the feature classes but I am not able to iterate through different folders and databases
I thought tmaybe it would be useful to prepare the empty structures (for first and second projection, separately) and to program the model only to project and fill the databases but I'm pretty new to model builder.. I know that using %name% it will keep the imput filename, but how can I do it for databases?
I have attached both models to this post
thanks
M2
[ATTACH=CONFIG]33919[/ATTACH]
0 Kudos
4 Replies
DuccioNotari
Regular Contributor
the model that I have made (for feature classes) works only in one database, and I have to change the paths manually every time I change database!
0 Kudos
DuccioNotari
Regular Contributor
Anyone???
😛
0 Kudos
by Anonymous User
Not applicable
Original User: BrackeH

With ModelBuilder you can only use one iterator at a time.  I would try creating a table with the paths of the feature classes that need to be updated and Iterate through the rows of that table, then use the model-only Get Field Value tool to get the Feature Class and feed that as the tool input parameter.  I'm not sure how well it will work, but it's worth a shot...
0 Kudos
by Anonymous User
Not applicable
Original User: Masare2

Thanks BrackeH!
I think that a solution to my problem could be to keep part of the path of the feature classes as I do for the names using %name%
once I have set up the workspace (and I have prepared all the empty databases) I would like to execute a process that works on a file in
c:\data\old\database.mdb filename   and put it in    c:\data\new\database.mdb filename
using something like
%workspace%\new\%database% %filename%
0 Kudos