Building model to attach photos to feature classes using iteration

2896
1
09-18-2015 06:10 PM
JanicePerez
New Contributor III

I am having trouble building a model in model builder and would love to receive some input.

I am building a model to 1) add and calculate field to copy GlobalID field, 2) project a feature class (points) into an Output GDB then 2) attach photos to each of the feature classes from a photo folder using an attachment table that uses the newly copied GlobalID field. I am also trying to build in an iteration where the model will run through all the feature classes and perform the same geoprocessing for all the feature classes in the input geodatabase. However, I'm running into some roadblocks:

  1. I can only use one iteration in a model at a time,
  2. There are unique attachment tables for each feature class.
    • When I use the model, I can only specify one attachment table, so my model ends up trying to attach photos using the same attachment table for all the feature classes. How can get my model to perhaps use the relationship class that each feature class has with its unique attachment table?

I have attached a screenshot of my model for reference.

Any help is appreciated. Thanks!

0 Kudos
1 Reply
FreddieGibson
Occasional Contributor III

1. You could use multiple submodels to utilize more than one iterator. Other than iterating the feature classes what was the other iteration logic you needed to implement?

Integrating a model within a model

http://desktop.arcgis.com/en/desktop/latest/analyze/modelbuilder/integrating-model-within-a-model.ht...

** NOTE: You'll want to pay particular attention to the following section on the above page **

2015-09-21_0936.png

2. You could use inline-variable substitution or the calculate field tool to accomplish this. For either approach you'd need a method to calculate the name of the table or the path to it programmatically.

Examples of inline model variable substitution

http://desktop.arcgis.com/en/desktop/latest/analyze/modelbuilder/examples-of-inline-model-variable-s...

Calculate Value

http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/calculate-value.htm

0 Kudos