I wan't to create a model where at the end any empty outputs are automatically deleted. To do this I've tried a few things, mainly with python either through an embedded script tool or though python code in a calculate value tool. Everything seems to work fine when I run the model within model builder (Model > Run Entire Model), but as soon as I close the model and try running it through the dialog box (Toolbox > Double click on the model) way more feature classes are deleted then should be. I've been using a get count function where the input feature class is deleted if the number of features is 0. Can anyone think of why the results might be so different?