Create models

Provided with the As-Built Editing and Analysis solution are the scripts required to append data to a feature service or remove data from a feature service. To create a repeatable workflow for your organization, you can create a series of geoprocessing models that call the scripts provided with parameters for your organization already populated.

Publish Group

To create a model to publish the results in a group layer to a feature service in your ArcGIS organization, complete the following steps:

  1. Browse to the PublishTracing.tbx and add a new model.
  2. In this model, add the Append Group Layer to Feature Service tool from the scripts folder.
  3. Expose the Group Layer parameter as a model parameter.
  4. Fill in the feature service item ID with the ID of your published feature service to store the results.
  5. Select the LayerMap table from the provided geodatabase. This table defines the layer names returned from the trace and to which layer in the service they should be loaded.
  6. Verify Match Full Name is unchecked.
  7. If publishing to ArcGIS Online, select WGS_1984_Web_Mercator_Auxiliary_Sphere (WKID 3857) as the output spatial reference.
  8. Save and close the model.

Reset Service

To create a model to remove data from a feature service, complete the following steps:

  1. Browse to the PublishTracing.tbx and add a new model.
  2. In this model, add the Remove Data from Feature Service tool.
  3. Fill in the feature service item ID with the ID of your published feature service to store the results.
  4. Enter the names of the layers from which to remove data.
  5. Specify a SQL statement. To remove all data from the feature service use the expression 1=1.
  6. Save and close the model.
Top