Optional processes within modelbuilder

6137
2
01-20-2015 06:00 AM
BenjaminMittler
Occasional Contributor III

I have created a tool in model builder that has 2 inputs, a feature and a soils layer. The tool Buffers the input feature, clips the soils layer to the buffered feature, and then erases the area of the input feature, leaving only the buffered area. From here it further manipulates the buffered area. 

I want to know if its possible within model builder to make the erase process within my tool optional. Ideally there would be a checkbox saying "erase input feature", if the button was checked it would run as stated above, but if it wasnt checked it would completely ignore the erase process and continue with the rest of the model.

I know this can be done using if-then logic but i would like to know if there are any tools within modelbuilder that can help me with what i want.

Thanks,

Ben

0 Kudos
2 Replies
DuncanHornby
MVP Notable Contributor

You can achieve this by adding a Boolean variable to the model (right click in some space in model builder and choose create variable). Then make that a precondition to the Erase tool. If you want this to be exposed as a check box when you run your model from toolbox (so not from within model builder) then simply set it as a parameter.

KishorGhatage
Occasional Contributor III

7-Setting model parameter type:

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

0 Kudos