Creating a custom check

Data Reviewer provides many checks that can be configured for your data as well as a framework for creating your own checks. The tutorials and samples available with Data Reviewer provide code samples and instructions for programming your own check. The Custom check allows you to run your code as part of a Reviewer check or batch job. If you have custom condition table (CNT) extensions that were created prior to Data Reviewer 10, you can still use the DLLs associated with them by creating a Custom check.

This check allows you to specify the extent on which you want to run the check, the GUID for the custom check extension, and a description so other users can understand the conditions for which the check is searching.

The Custom check can be run using one of three options for the extent:

Once you have defined the criteria for the check, you can configure the notes and a severity rating. The notes allow you to provide a more specific description for the feature that has been written to the Reviewer table and are copied to the Notes field in the Reviewer table. The severity rating allows you to indicate how important the results from a check are in terms of your quality assurance/quality control processes. The lower the number, the greater the priority the check's results have.

注意注意:

You need to ensure that the custom code run by this check is registered on all machines on which the check is going to be run.

步骤:
  1. Start ArcMap.
    提示提示:

    If the ArcMap - Getting Started dialog box appears, you can open a new or existing map document. You can also check the Do not show this dialog box in the future check box and click Open.

  2. If necessary, load data in the map.
  3. On the main menu, click Customize > Toolbars > Data Reviewer.
  4. Click the Select Data Check drop-down arrow on the Data Reviewer toolbar, click the plus sign (+) next to Advanced, then click Custom Check.

    The Custom Check Properties dialog box appears.

    Custom Check Properties dialog box
  5. If necessary, type a unique name for the check in the Check Title text box.
    注意注意:

    The check title can be used to describe the conditions you are looking for with the check. This is useful when you have multiple instances of the same check to validate the same feature classes or tables but with different validation parameters.

  6. Choose an option for the data that is going to be validated in the Type of Check area.

    If you want to validate a selection set

    Click the option next to the Feature Class area, then click the Feature Class/Object Class drop-down arrow and choose the feature or object class you want to validate with the custom check.

    If you want to validate all the features or records in a feature or object class

    Click the option next to the Feature Class area, then click the Feature Class/Object Class drop-down arrow and choose the feature or object class you want to validate with the custom check. Next, check the Always Run on Full Database check box.

    If you want to validate an entire workspace

    Click the option next to the Workspace area, then click the drop-down arrow and choose the workspace you want to validate with the custom check.

    警告警告:

    Feature classes that are included in a dataset are not validated with this option.

  7. Type the GUID for the DLL associated with the custom check in the GUID text box.
  8. Click Registered to ensure that the DLL is registered on the computer.
    警告警告:

    If the DLL is not registered, the check cannot be run.

  9. To define specific parameters for the custom check, do the following in the Parameters area:
    1. Type an argument in the Argument cell.

      An example of an argument would be a field name on the feature class that you want to validate.

    2. Optionally, type a description of the argument in the Description cell.

      An example of a description is a string that tells users what condition is being validated.

  10. If necessary, type a description of what the check is validating in the Description of Custom Check text box.
  11. If necessary, type descriptive text for the check results in the Notes text box in the Reviewer Remarks area.
  12. If necessary, click the Severity drop-down arrow and choose a value that indicates the priority of the check's results in the Reviewer Remarks area.
  13. Click OK.
  14. Click the Run Data Check button Run Data Check on the Data Reviewer toolbar.

    The Features to Validate dialog box appears.

    Features to Validate dialog box
  15. Choose an option in the Features to Validate area.
    • Selection Set—The check is run on the features that are currently selected in the map.
    • Current Extent—The check is run on the current map extent, which is controlled by the map scale.
    • Definition Query—The check is run on the features that are displayed based on definition queries that have been created for the feature class.
    • Full Database—The check is run on all the features in the feature class.
  16. Click OK.

9/30/2010