Model Builder: export layer names and file locations as variables

Idea created by JVerachtert on May 24, 2010
    New
    Score50
    • zadar1
    • burt_mcalpine
    • nselleh
    • JVerachtert
    • mping
    When exporting a model to a script, make all instances of layer names and file locations variables rather than hard coding them into the tool commands.  This will make it easier for later changes to the scripts if a layer name needs to change, a directory relocated or if any of these items are to be created dynamically inside the script. 

    For example in FeatureClassToFeatureClass_conversion, the input feature class is properly defined using a variable, however the InTableName that is part of the FieldMap is hardcoded multiple times, once for each field being transferred.

    Using that same tool as an example, the output location is a variable but the output layer name is hardcoded.

    (All based on 9.3.1 Export to Python)