Need to mark an error without geometry

829
5
05-23-2019 03:48 AM
M_DJohnson
Occasional Contributor

A simple custom check If no features in the FeatureClass that need to mark an error without geometry but when run this custom check it is throwing an error given below.

Error: Unable to get row for OID 0 in Table

IPLTSError2 ipReviewerResult = new PLTSErrorClass() as IPLTSError2;
ipReviewerResult.ErrorKind = pltsValErrorKind.pltsValErrorKindWarning;
ipReviewerResult.LongDescription = "Dataset does not contain at least one feature";
ipRevResultCollection.AddError(ipReviewerResult);

Tags (1)
0 Kudos
5 Replies
M_DJohnson
Occasional Contributor

Does anyone here ??

0 Kudos
M_DJohnson
Occasional Contributor

Is it possible insert ReviewerResult without geometry ?? 

0 Kudos
M_DJohnson
Occasional Contributor

Anyone from esri team ??? 

0 Kudos
ShankarChandrasekaran
Esri Contributor

M D Johnson‌, A Reviewer result/error is typically created against a row/feature in source feature class. When a custom check creates a PLTSError, it will be able to define the row on which the error occurred. We do this by identifying the source feature. Typically this information is stored in the error as part of the ObjectID field. Also, where there is no geometry (error geometry for an error) provided for the IPLTSError (set using IPLTSError2 interface ), the system tries to use the original feature's geometry as the error geometry for the feature.

In your case, you are looking for an ability to create an error for the feature class and not pointing to any particular feature. This is currently not supported as part of Reviewer Custom Check.

There is alternative, but this cannot be run as part of a batch job. You will need to write a custom button/command/tool which can use Write To Reviewer Table sample to write this as an error to Reviewer table. This will create an error in the Reviewer errors that points to the feature class.  The sample link I referenced is an old version. But you will need to modify a couple of namespaces and code to be able to do this. 

 

Also there will be one more change from the sample code that you will need to make to get this working correctly.

Let me know if this helps.

Thanks,

Shankar

M_DJohnson
Occasional Contributor

Hi Shankar,

We felt that this information is stored in the unit table so it should have functionality to store information as a record. In the DR Flag Missing Feature is do the same thing what we are expecting. Could you please look into this.

In the suggested base command procedure also need to give geometry input.

Regards

Johnson

0 Kudos