Select to view content in your preferred language

Question Regarding the If Selection Exists ModelBuilder Tool

456
3
01-04-2023 09:44 PM
CMorneau
New Contributor II

I have several short models that use the If Selection Exists logical tool, and they work great in ModelBuilder.  However, it appears that these individual models will not work when used as submodels in a Model Tool.  The ArcGIS Pro documentation states "This tool is only available from the ModelBuilder ribbon for use in models.  The tool is not available from the Geoprocessing pane or from Python."  Is this the reason why one or more of my submodels containing If Selection Exists will not work in my Model Tool?

I'll start with this basic question, and depending on what responses I receive, I'll provide further details on what I'm trying to do.  I am using ArcGIS Pro 3.0.3.

Thank you!

0 Kudos
3 Replies
by Anonymous User
Not applicable

I think that depends on how you are bringing the submodels in. maybe 'hard code' the submodel processes to the main one and see if it works.  If it does, then I think you'll have your answer.

0 Kudos
DuncanHornby
MVP Notable Contributor

Here is some sample data, note 2 points are selected:

DuncanHornby_0-1673027089220.png

Here is the sub-model (This I called Select Model), with a single selection exist tool:

DuncanHornby_1-1673027198644.png

 

Here is the master model:

DuncanHornby_2-1673027262015.png

If a selection exists as determined by the sub-model (Select Model) then buffer the selection, else do a selection based upon ID. All logic ran as expected, may be you were not exposing the parameters of the sub-model as Parameters (those P's)?

0 Kudos
BrettLessner
Occasional Contributor

Did you ever find an alternative for this? I'm running into the same issue (I assume). If the True/False is a precondition for an out-of-the-box Esri tool, the model processes as I would expect.... True do this process; False do that process.
However, if the True/False is a preconditions for a sub-model, the processing doesn't seem to reach the sub-model and returns a Completed result.

- Brett

0 Kudos