Defines whether an object is valid based on the ArcFM rule. The key here is the returning list of errors.
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 |
|
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.