If you want to write your own plugin filter then you have to do it programatically by creating a dll that implements a .Net interface.
(If using .Net)
- Create a Class Library for .Net Framework
- Make a reference to MSP.ObjectAndProcessor.dll
- Implement the interface MSP.ObjectAndProcessor.IPluginFilterOandPdata
Below are the important properties and methods.
These are the ones that you must populate or call.
Everything else is not used in MSP Librarian.
Name - Used internally by MSP Librarian
Description_Short - Displayed in the filter list
Description_Long - Used as the tooltip in the filter list
TypeOfFilter - Defines either read or write filter type from the enumeration FilterType.FilterType
Data - The comments
Peaks - The peaks
BlockName - The Name comment
ApplyFilter - The exposed method call. Put your code in here
Here are examples in VB and C# using default code generated by Visual Studio.
Imports MSP.ObjectAndProcessor
Public Class ExampleFilterVB
Implements MSP.ObjectAndProcessor.IPluginFilterOandPdata
Public ReadOnly Property Name As String Implements IPluginFilterOandPdata.Name
Get
Throw New NotImplementedException()
End Get
End Property
Public ReadOnly Property Description_Short As String Implements IPluginFilterOandPdata.Description_Short
Get
Throw New NotImplementedException()
End Get
End Property
Public ReadOnly Property Description_Long As String Implements IPluginFilterOandPdata.Description_Long
Get
Throw New NotImplementedException()
End Get
End Property
Public ReadOnly Property Description_VeryLong As String Implements IPluginFilterOandPdata.Description_VeryLong
Get
Throw New NotImplementedException()
End Get
End Property
Public ReadOnly Property TypeOfFilter As FilterType.FilterType Implements IPluginFilterOandPdata.TypeOfFilter
Public ReadOnly Property Error_Exception As Exception Implements IPluginFilterOandPdata.Error_Exception
Public ReadOnly Property Error_HasOne As Boolean Implements IPluginFilterOandPdata.Error_HasOne
Public ReadOnly Property Error_MsgBox_Prompt As String Implements IPluginFilterOandPdata.Error_MsgBox_Prompt
Public ReadOnly Property Error_MsgBox_Caption As String Implements IPluginFilterOandPdata.Error_MsgBox_Caption
Public Property Data As List(Of CommentElement) Implements IPluginFilterOandPdata.Data
Public Property Peaks As PeakListObject Implements IPluginFilterOandPdata.Peaks
Public Property BlockName As String Implements IPluginFilterOandPdata.BlockName
Public ReadOnly Property RequiresParameterFile As Boolean Implements IPluginFilterOandPdata.RequiresParameterFile
Public Property Parameter_File_Name As String Implements IPluginFilterOandPdata.Parameter_File_Name
Public ReadOnly Property Parameter_File_Extension As String Implements IPluginFilterOandPdata.Parameter_File_Extension
Public ReadOnly Property Parameter_File_Extension_Filter_Text As String Implements IPluginFilterOandPdata.Parameter_File_Extension_Filter_Text
Public Sub ApplyFilter() Implements IPluginFilterOandPdata.ApplyFilter
Throw New NotImplementedException()
End Sub
End Class
using MSP.ObjectAndProcessor;
using System;
using System.Collections.Generic;
namespace ClassLibrary1
{
class ExampleFilterCSharp : MSP.ObjectAndProcessor.IPluginFilterOandPdata
{
public string Name => throw new NotImplementedException();
public string Description_Short => throw new NotImplementedException();
public string Description_Long => throw new NotImplementedException();
public string Description_VeryLong => throw new NotImplementedException();
public FilterType.FilterType TypeOfFilter => throw new NotImplementedException();
public Exception Error_Exception => throw new NotImplementedException();
public bool Error_HasOne => throw new NotImplementedException();
public string Error_MsgBox_Prompt => throw new NotImplementedException();
public string Error_MsgBox_Caption => throw new NotImplementedException();
public List<CommentElement> Data { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public PeakListObject Peaks { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public string BlockName { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public bool RequiresParameterFile => throw new NotImplementedException();
public string Parameter_File_Name { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public string Parameter_File_Extension => throw new NotImplementedException();
public string Parameter_File_Extension_Filter_Text => throw new NotImplementedException();
public void ApplyFilter()
{
throw new NotImplementedException();
}
}
}