Custom sample ID naming schemas can be created for use with EDGE's Sample ID Builder.
Note: This feature requires proficiency with the Microsoft Visual Basic programming language as well as access to Microsoft Visual Studio (version 2010 or later is recommended).
1.Locate Example.vbproj, which is provided in the EDGE folder (\EDGE\Tutor\HandlerExample\).
2.Open the file in Microsoft Visual Studio.
3.Using the example project as a template, redesign the custom handler's code as desired.
Please note the following:
•The example project uses the "EDGE_LocDateMatrixDepth_Type2" sample ID schema as an example.
•The namespace of the class must contain "Plugin.Handler", but the assembly name may be changed as desired.
•The class must implement 'EarthSoft.EDGE.ICustomHandlerSysSampleCode' as shown below:
1: Public Class Example
2: Implements EarthSoft.EDGE.ICustomHandlerSysSampleCode
oThe following "If" statement must be inserted in the location noted below, at approximately line 82:
81: Public Function GetCustomSysSampleCode(sampleRow As System.Data.DataRow, columnChanged As String, ByRef
sysSampleCode As String) As Boolean Implements ICustomHandlerSysSampleCode.GetCustomSysSampleCode
82: If columnChanged.ToLower.Equals("sys_sample_code") Then
83: Return False
84: End If
86: sysSampleCode = String.Empty
87: With sampleRow
4.When coding is complete, compile the project into a *.dll file.
5.The project should compile automatically to the correct directory (.\EDGE\Formats\EDGE\Plugins\Handlers\). If not, place the compiled *.dll there manually.
6.Using the EDGE Configuration tool, move "EDGE_CustomSampleCode" to the top of the "sampleid_schema" enumeration section.
7.Also using the EDGE Configuration tool, place either "REPLACE" or "ADHOC_ONLY" at the top of the "sampleid_spm" enumeration section. Explanations on each of these settings may be found in documentation on the Sample ID Builder.
Copyright © 2020 EarthSoft, Inc • Modified: 25 Mar 2020