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:
- Selection Set—The feature or object class selected in a single feature or object class, with or without a SQL query defined on the dialog box
- Object Class—All the features or objects in a single feature class or object class
- Workspace—All the feature classes or object classes at the root level of a workspace
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.
- 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.
- If necessary, load data in the map.
- On the main menu, click Customize > Toolbars > Data Reviewer.
-
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.
- 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.
-
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.
- Type the GUID for the DLL associated with the custom check in the GUID text box.
- Click Registered to ensure that the DLL is registered on the computer.警告:
If the DLL is not registered, the check cannot be run.
- To define specific parameters for the custom check, do the following in the Parameters area:
- 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.
- 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.
- Type an argument in the Argument cell.
- If necessary, type a description of what the check is validating in the Description of Custom Check text box.
- If necessary, type descriptive text for the check results in the Notes text box in the Reviewer Remarks area.
- 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.
- Click OK.
-
Click the Run Data Check button on the Data Reviewer toolbar.
The Features to Validate dialog box appears.
-
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.
- Click OK.