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 displaying new features.

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

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 feature set control as a drop-down list, illustrated below.

Using symbology from schema

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 attribute fields of the feature set will be the same as the attribute fields of the feature class' attribute table. If a layer file or layer from the ArcMap table of contents is used for the feature set schema, the symbology of the feature set will be the same as the symbology of the layer file or layer.

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.

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 schema is read and stored with the model variable. If the source schema 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.
  4. Because the schema is read and stored with the feature or record set model variable, the schema source dataset can be deleted once the schema has been applied to the model variable.

Feature Set and Record Set attributes

TipTip:

To keep the feature set or 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 special internally managed fields that can be viewed but not edited. These noneditable fields are never shown as attributes of a feature or 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 the Use features from Use features from or Use records from Use records from option. When using an existing dataset, the dataset is checked to determine if the schema attributes are found in the dataset. If any of the schema attributes are missing from the dataset, a warning is issued.

NoteNote:

Since a warning, not an error, is raised, the tool can still be executed. If the model tool depends on fields in the schema being present in the dataset, model execution may 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


9/13/2011