AnsweredAssumed Answered

Having trouble in book "Getting to Know ArcGIS ModelBuilder"

Question asked by lholcombe on Feb 11, 2013
Latest reply on Jan 28, 2014 by pk_davidson
Hello,
I'm not sure if this is the best place to ask about this, but... Recently I have been working through the exercises in the ESRI Press book Getting to Know ArcGIS ModelBuilder by David W. Allen, and I have found what I believe may be a mistake in exercise 3D (exercise D, chapter 3). It would be pointless and possibly a breach of copyright to reproduce all the steps and processes of the exercise here, so I will assume you have a copy of this book available.

In this exercise, the user creates a Python script to check a geodatabase workspace for the existence of a feature class, and creates one if none exists. However, I believe this script only checks for feature classes in the root of the geodatabase, without checking for feature classes inside a feature dataset. Since this exercise creates its feature classes within a feature dataset, the check will never resolve to True. If a feature class with the same name already exists in the workspace, the model itself won't run - ArcGIS will flag the feature class name as inappropriate during the parameter input stage. The model asks for a feature dataset as a parameter where the feature class will be stored, and checks for the pre-existence of the feature dataset, but it doesn't check for feature classes that already exist within the feature dataset. And the "Empty FC to Store Schema" template appears to remove any feature classes that exist within the feature dataset, so the model never even notices whether a feature class of that name already exists.

Am I missing something here? I'm just getting started with this stuff, so it's possible that I am not understanding this correctly. If anyone has access to this book, and experience with Python and modeling, I'd appreciate some insight.

Thank you.

Outcomes