Setting feature set and record set schema

A feature set schema defines the attributes and geometry type (point, line, or polygon) of the features to be interactively entered. The schema can also define the symbology to use when creating new features.

A record set schema defines the attributes of the records to be interactively entered.

Feature set and record set schema sources

The feature set schema can be inherited from a feature class, a layer file (.lyr) that references a feature class, or a layer in the ArcMap table of contents. The geometry of the feature set will be the same as the geometry of the feature class providing the schema. The symbology and attribute information for the features themselves are driven by feature templates. If a feature template exists prior to setting the schema information the interactive feature input will honor the template settings. If a feature template has not been created for the schema reference layer, a default feature template is created at the time of assigning the schema. This template will use basic symbology without any default attributes values.

By taking the time to author a good feature template prior to creating your model you create a better end user experience. The symbology and name given to a feature can assist your users while they interactively enter features. These features can also have default attribute values assigned, again making it easier for your user to enter features without requiring knowledge of the underlying attributes.

The record set schema can be inherited from a table, a feature class (a feature class is a kind of table that also has geometry), or a table in the ArcMap table of contents. The attribute fields and any attribute domains of the feature set will be the same as the attribute fields and attribute domains of the table providing the schema.

Using a feature set control to interactively provide input for a model
NoteNote:

If a schema is not specified for a feature set or record set, the interactive entering of features or records will be unavailable. Setting the schema is necessary because the geometry type and attributes of the features or records to be entered must be known prior to data being entered.

If a feature set or record set schema contains attributes with a coded value attribute domain, the coded values will appear in the Attribute Table window when adding features, or the Template Properties window when modifying the default value.

Setting feature set and record set schema

Steps:
  1. In ModelBuilder, right-click the feature or record set variable and choose Properties.
  2. Click the Data Type tab.
  3. In the Import schema and symbology from field, enter or browse to the path of the dataset to use as the schema source and click OK.

Changing feature set and record set schema

NoteNote:

When a schema is applied to a feature set or record set, the feature template information is stored with the model variable. If the source template is changed—for example, changing the symbology, adding a field, or modifying a coded value domain—the schema will need to be reapplied to the feature set or record set variable so these changes can be stored with the model variable again.

Steps:
  1. In ModelBuilder, right-click the feature or record set variable and select Properties.
  2. Click the Data Type tab.
  3. In the Import schema and symbology from field, enter or browse to the path of the dataset to use as the schema source and click OK.

Feature set and record set attributes

TipTip:

To keep the record set control from being overly cluttered and even confusing, delete any unnecessary fields from the source schema dataset before importing the schema to the model variable.

Some fields, such as OBJECTID and Shape_Length, are internally managed fields that can be viewed but not edited. These non-editable fields are never shown as attributes of a record set.

Attribute domains are rules that restrict what values are valid or permissible for the attribute field. If an attribute field in the schema source dataset has a coded value attribute domain, those coded values will be displayed in a drop-down list for that attribute field's value in the feature set or record set control.

Record set attribute value domain

Schemas and existing datasets

The feature and record set controls also allow existing datasets to be used. To do this, use either the drop-down list to select layers and tables in the map, or the Open button Open to select datasets on disk.

NoteNote:

The input of your features or records do not need to match the schema defined by your template at input. However, you need to take care as the model or script may depend on the set schema—when those fields are not found the tool will fail.

Tools that modify schema

Feature set and record set schemas cannot be altered. Tools that modify schemas by adding or deleting fields cannot use feature sets or record sets as input. To use one of these tools with features or records entered interactively through a feature or record set, first use the Copy Features or Copy Rows tool to copy the features or records to a new feature class or table, then use the new dataset as the input to the tool that modifies schemas.

Feature set and record set with tools that modify schema

Related Topics

10/29/2012