Brilliant!
As you stated, I used the spatial reference of the data to be validated as a parameter of arcpy.EnableDataReviewer_Reviewer and BOOM .... my geometry showed up as expected.
Thanks for the help!!!!
Hi. When you enable the Reviewer workspace, you need to pass in the spatial reference that matches the data you are validating. If you do not pass in the spatial reference, it will default to GCS_WGS_1984. If the spatial reference of your features you are validating does not match the spatial reference of the Reviewer workspace, it cannot capture the error geometries.
Hope this helps.
Cheers,
michellej.
This is a very old thread, but I seem to be having the same problem.
I have a RBJ file setup that runs great on Desktop. It produces the correct output and error geometries in REVTABLEPOLY (I'm only checking polygons in this RBJ).
When I run the same RBJ using arcpy in Python, it completes successfully and produces the correct errors as seen in REVTABLEMAIN, but there are no error polygons in REVTABLEPOLY. I need those error polygons in addition to the details found in REVTABLEMAIN.
The associated bits from my Python code pertaining to this creates an empty and new file geodatabase. Then it enables Data Reviewer in this GDB. Then I create a new session in the Reviewer Workspace. I then run the RBJ. I am pretty sure I'm doing this correctly since I do get valid results.....just not the error polygons. Is there a parameter I'm overlooking? I've included the part of code in question below.
<SPAN class="comment token"># Check Out Data Reviewer Extension</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>CheckOutExtension<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"datareviewer"</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="comment token"># Create GDB to Contain RBJ Errors</SPAN> now <SPAN class="operator token">=</SPAN> datetime<SPAN class="punctuation token">.</SPAN>datetime<SPAN class="punctuation token">.</SPAN>now<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> gdbName <SPAN class="operator token">=</SPAN> <SPAN class="string token">'%s%s%s_%s%s%s.gdb'</SPAN> <SPAN class="operator token">%</SPAN> <SPAN class="punctuation token">(</SPAN>now<SPAN class="punctuation token">.</SPAN>strftime<SPAN class="punctuation token">(</SPAN><SPAN class="string token">'%m'</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> now<SPAN class="punctuation token">.</SPAN>strftime<SPAN class="punctuation token">(</SPAN><SPAN class="string token">'%d'</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> now<SPAN class="punctuation token">.</SPAN>strftime<SPAN class="punctuation token">(</SPAN><SPAN class="string token">'%Y'</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> now<SPAN class="punctuation token">.</SPAN>strftime<SPAN class="punctuation token">(</SPAN><SPAN class="string token">'%H'</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> now<SPAN class="punctuation token">.</SPAN>strftime<SPAN class="punctuation token">(</SPAN><SPAN class="string token">'%M'</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> now<SPAN class="punctuation token">.</SPAN>strftime<SPAN class="punctuation token">(</SPAN><SPAN class="string token">'%S'</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>CreateFileGDB_management<SPAN class="punctuation token">(</SPAN>batchOutDir<SPAN class="punctuation token">,</SPAN> gdbName<SPAN class="punctuation token">)</SPAN> <SPAN class="comment token"># Set Geoprocessing Workspace Environment</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>env<SPAN class="punctuation token">.</SPAN>workspace <SPAN class="operator token">=</SPAN> batchOutDir<SPAN class="operator token">+</SPAN>os<SPAN class="punctuation token">.</SPAN>sep<SPAN class="operator token">+</SPAN>gdbName <SPAN class="comment token"># Enable Data Reviewer inside GDB</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>EnableDataReviewer_Reviewer<SPAN class="punctuation token">(</SPAN>arcpy<SPAN class="punctuation token">.</SPAN>env<SPAN class="punctuation token">.</SPAN>workspace<SPAN class="punctuation token">)</SPAN> <SPAN class="comment token"># Start Reviewer Sesson</SPAN> session <SPAN class="operator token">=</SPAN> <SPAN class="string token">"Automated Checks"</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>CreateReviewerSession_Reviewer<SPAN class="punctuation token">(</SPAN>arcpy<SPAN class="punctuation token">.</SPAN>env<SPAN class="punctuation token">.</SPAN>workspace<SPAN class="punctuation token">,</SPAN> session<SPAN class="punctuation token">)</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>MakeFeatureLayer_management<SPAN class="punctuation token">(</SPAN>polysToCheck <SPAN class="operator token">+</SPAN> <SPAN class="string token">'\NGlayers\ESNs'</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">'polyLyr'</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="comment token"># Run Automated Checks RBJ File</SPAN> res <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>ExecuteReviewerBatchJob_Reviewer<SPAN class="punctuation token">(</SPAN>arcpy<SPAN class="punctuation token">.</SPAN>env<SPAN class="punctuation token">.</SPAN>workspace<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"Session 1 : Automated Checks"</SPAN><SPAN class="punctuation token">,</SPAN> workDir <SPAN class="operator token">+</SPAN> os<SPAN class="punctuation token">.</SPAN>sep <SPAN class="operator token">+</SPAN> rbjFile<SPAN class="punctuation token">,</SPAN> polysToCheck<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'polyLyr'</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="comment token"># Check In Data Reviewer License</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>CheckInExtension<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"datareviewer"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
I'm running ArcGIS Desktop 10.5.1.7333. Data Reviewer version 10.1-10.5 (as stated in Administrator). Python 2.7.13.
If anyone has some input on what I can do to produce these polygons, please let me know. Thanks!
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.