# Name: WriteToReviewerTable_Example.py
# Description: Imports features into the Reviewer workspace
# Requirements: ArcGIS Data Reviewer extension
# Import arcpy module
import arcpy
from arcpy import env
# Check out a Data Reviewer extension license
arcpy.CheckOutExtension("datareviewer")
# set the environment
env.workspace = "c:/arcgis/ArcTutor/Data Reviewer"
# Path to feature class and Reviewer workspace
Hospitals = "California.gdb/Landmarks/Hospitals"
reviewer_gdb = "Reviewer.gdb"
# Use the Create Reviewer Session tool to create a session before running this script.
Session = "Session 1 : Session 1"
# Execute the Write to Reviewer Table function with all required parameters
# Original Table name determined by the String value
arcpy.WriteToReviewerTable_Reviewer(reviewer_gdb, Session, Hospitals, "OBJECTID", "My table name", "My review status")
# Execute the Write to Reviewer Table function with all required parameters
# Original Table name determined by the value in the field specified
arcpy.WriteToReviewerTable_Reviewer(reviewer_gdb, Session, Hospitals, "OBJECTID", "NAME", "My review status")
# Execute the Write to Reviewer Table function with all required parameters and all optional parameters
# Original Table name/Subtype/Notes/Severity/Check Title determined by the String value
arcpy.WriteToReviewerTable_Reviewer(reviewer_gdb, Session, Hospitals, "OBJECTID", "My table name", "My review status", "My Subtype", "New Hospitals", "3", "My Check results")
# Execute the Write to Reviewer Table function with all required parameters and optional parameters
# Original Table name/Subtype/Notes/Check Title determined by the value in the field specified
arcpy.WriteToReviewerTable_Reviewer(reviewer_gdb, Session, Hospitals, "OBJECTID", "NAME", "CITY", "TYPE_CODE", "ADMIN_DESC", "3", "TYPE_DESC")
# Check in the Data Reviewer extension
arcpy.CheckInExtension("datareviewer")