ArcFM Desktop Overview > ArcFM Desktop Developer Samples > Validation Rule (VB .NET) |
Product Availability: ArcFM Desktop, ArcFM Engine
This sample class validation rule ensures that the rated kVA of a transformer is equal to the total kVA of all the related transformer units.
Developer Sample: Developer Samples\Validation Rules\C# - Validation Rules
How to Implement:
How to Configure:
How to Use:
Requires:
All of the files shown below are required for the solution to build successfully. The Miner.Samples.VBNet.ValidationRule.sln solution contains two projects. To re-compile, you must open the .sln file. Download these files from the ArcFM Solution Resource Center here.
File
Description
Miner.Samples.VBNet.ValidationRule.vbproj
VB .NET project containing code to generate a custom validation rule.
RatedKvaValidationRule.vb
(view code)Defines how the validation rule behaves.
AssemblyInfo.vb
Supporting class module
The following reference files are required for the Miner.Samples.VBNet.ValidationRule.vbproj project to compile successfully.
Esri.ArcGIS.Geodatabase
Esri.ArcGIS.System
log4net
Miner.Interop.Framework
Miner.Interop.Geodatabase
Miner.System
stdole
System
System.Data
System.XML
Because the IMMExtObject interface is not available in Visual Basic .NET, the following C# class is provided to be used by VB .NET to inherit this interface.
File
Description
Miner.Samples.VBNetClasses.csproj
This project is located in this directory: Include Modules\VB.NET - Include Modules\VBNetBaseClasses\.
BaseExtObject.cs
(view code)This class makes the IMMExtObject interface available to Visual Basic .NET.
AssemblyInfo.vb
Supporting class module
The following reference files are required for the Miner.Samples.VBNetClasses.csproj project to compile successfully.
Miner.Interop.Framework
stdole
System
System.Data
System.XML