ArcFM Engine Developer Guide
IsValid Method (IMMValidationRule)


IRow
Defines whether an object is valid based on the ArcFM rule. The key here is the returning list of errors.
Syntax
'Declaration
 
Function IsValid( _
   ByVal pRow As ESRI.ArcGIS.Geodatabase.IRow _
) As ID8List
'Usage
 
Dim instance As IMMValidationRule
Dim pRow As ESRI.ArcGIS.Geodatabase.IRow
Dim value As ID8List
 
value = instance.IsValid(pRow)
ID8List IsValid( 
   ESRI.ArcGIS.Geodatabase.IRow pRow
)

Parameters

pRow
IRow

Return Value

Remarks
ArcMap may crash if a large number (approximately 9,000) of invalid features are found using the QA/QC tool and custom QA validation rules in a single ArcMap session. To avoid this problem, do not use the BitmapID property on the IMMValidationRule::IsValid method.
Example
The following code sample demonstrates how the IMMValidationRule::IsValid method may be implemented.
Visual Basic Copy Code
Private Function IMMValidationRule_IsValid(ByVal pRow As IRow) As mmGeodatabase.ID8List
    Dim pList As ID8List
    Set pList = New D8List
    Dim pError As IMMValidationError

'Code to check for errors...

    Set pError = New MMValidationError

Dim IBMHandle As Long
Dim ISeverity As Long
Dim sMsg As String

    Dim lresInstance As Long
    lresInstance = LoadLibrary("C:\ example.dll")
    IBMHandle = LoadBitmapBynum(lresInstance, 101)
ISeverity = 8
sMsg = "Error Text"

    With pError
         .BitmapID = IBMHandle
        .ErrorMessage = sMsg
        .Severity = iSeverity
    End With

pList.Add pError

    Set IMMValidationRule_IsValid = pList
End Function
Requirements

Target Platforms: Windows XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)

Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.

See Also

Reference

IMMValidationRule Interface
IMMValidationRule Members

 

 


Send Comment