[an error occurred while processing this directive][an error occurred while processing this directive]
Geoprocessing models can be designed to allow users to interactively draw or add input data when they run the model. This is accomplished by modifying a geoprocessing tool's input data type in ModelBuilder to either Feature Set or Record Set, depending on the type of input expected.
Feature sets and record sets are useful for a variety of applications. For example:
Changing an input data type in ModelBuilder to Feature Set will provide the user with the ability to create and, optionally, populate attributes for point, line, or polygon features on the fly. For instance, if a user needs to build a model that takes the input features drawn by another user and copies them into a new feature class, populating the attribute information, as well as drawing the features interactively, can be useful. Changing an input data type in ModelBuilder to Record Set will give the user the ability to create a table on the fly.
When using feature set or record set inputs to allow for interactive feature creation, a user needs to define the schema of the features. For feature sets, the schema definition will define the geometry and associated attributes the user can draw and enter. In addition, the schema can also supply symbology definitions to be used when displaying the features. There are three options for doing this—import either a feature class, a feature layer, or a layer file. For record sets, the schema definition defines the attributes of each record the user can add. There are four options for defining record set schema—import either a table, a feature class, a layer file, or a table view.
To modify an input's data type to Feature Set or Record Set
Once you have completed this process on one of your own models, any user running the model will be presented with a dialog that allows them to add features interactively.
To learn more, visit the help articles Creating a Simple Model, Feature Sets and Record Sets, and Using the Interactive Feature and Record Input Controls.
Models that allow users to enter data interactively are more powerful than those that require data that already exists. Feature sets and record sets enable this capability. Any existing model that uses a table or feature class as an input can be modified to accept data created on the fly. Take models to a new level of flexibility by making them interactive!