Modelbuilder help

568
1
01-21-2014 05:19 PM
MarkMcPherson1
New Contributor II
[ATTACH=CONFIG]30689[/ATTACH]

The green triangles represent locations of mutual  funds, which can dozens (or hundreds) of stocks.

The  NEAR tool allows me to find the distance between a specific mutual fund  (e.g. "CHICKASAW CAPITAL MGMT") and each stock (e.g. BUCKEYE PARTNERS LP, CROSSTEX ENERGY INC, etc).

Since I have 226 mutual funds for which I need to locate their stocks, how can I do this in Modelbuilder? If I do this in ArcMap, I first must use Select by Attribute for Fund_Families ("F_FAMILY" = 'CHICKASAW CAPITAL MGMT'), and must do the same for Stocks layer. Then, I can use the NEAR tool.

But I don't want to have to do this 226 times. I just don't know Modelbuilder well enough to figure it all out. I appreciate any help!
Tags (2)
0 Kudos
1 Reply
WesleyAskew
New Contributor III
[ATTACH=CONFIG]30689[/ATTACH]

The green triangles represent locations of mutual  funds, which can dozens (or hundreds) of stocks.

The  NEAR tool allows me to find the distance between a specific mutual fund  (e.g. "CHICKASAW CAPITAL MGMT") and each stock (e.g. BUCKEYE PARTNERS LP, CROSSTEX ENERGY INC, etc).

Since I have 226 mutual funds for which I need to locate their stocks, how can I do this in Modelbuilder? If I do this in ArcMap, I first must use Select by Attribute for Fund_Families ("F_FAMILY" = 'CHICKASAW CAPITAL MGMT'), and must do the same for Stocks layer. Then, I can use the NEAR tool.

But I don't want to have to do this 226 times. I just don't know Modelbuilder well enough to figure it all out. I appreciate any help!


I think that you could do this by iterating through the records.  Select the features that you would like to run the near tool on and export.  Then, in Model Builder, iterate (loop) through each of these exported records using the ObjectID field with increments of one.  See here:  http://resources.arcgis.com/en/help/main/10.1/index.html#//00400000001n000000.
0 Kudos