Skip to main content

Micom SE Studio1 Import Filter - Using Of SEStudio1Import.vb Module

Welcome back to Micom SE Studio1 Import Filter tutorial series. In the previous tutorial, I've shown you how to create class module that responsible for setting file processing. Click this link Micom SE Studio1 Import Filter - Creating Class Module For Setting File Process

In this series, I will show you how to use the SEStudio1Import.vb class module that I created in the previous tutorial.




Now open the SEStudio1FilterBase.bv class, copy the codes below and replace the content of this class module.

Imports OMXRioData

Public Class SEStudio1FilterBase
Inherits OMXRioFilter.FilterBase
Private RELAY_PARAMETERS_BLOCK As String = "CUSTOM.RELAY_PARAMETERS"
Private AUTHOR_PARAMETER As String = "CUSTOM.AUTHOR.IMPORT_FILTER_AUTHOR"

Public Overrides Sub SetParameter(isImport As Boolean, paramName As String, paramValue As String)
'Do nothing
End Sub

Public Overrides Function ExecuteExport() As Boolean
Return False
End Function

Public Overrides Function ExecuteImport() As Boolean
Return True
End Function

Public Overrides Function GetParameter(isImport As Boolean, paramName As String) As String
Return String.Empty
End Function

Public Overrides Function IsExportSupported() As Boolean
Return False
End Function


Public Overrides Function ShowParameterDialog(isImport As Boolean) As Boolean
Dim Result As Boolean = False
If isImport Then
If IsDocumentValid() Then
Dim _UpdateForm As New SEStudio1UIForm
With _UpdateForm
.DisplayForm(Document)
End With
_UpdateForm = Nothing
Result = True
Else
MsgBox("The current test plan/routine is not compatible for this import filter. Some validation parameters are missing.", MsgBoxStyle.OkOnly + MsgBoxStyle.Exclamation, "Incompatible Test Plan/Routine")
End If
End If
Return Result
End Function

Private Function IsDocumentValid() As Boolean
Dim Result As Boolean = False
Dim Block As IAutoXRioBlock = Document.GetBlockFromIDs(RELAY_PARAMETERS_BLOCK)
Dim AuthorParam As IAutoXRioParameter = Document.GetParamFromIDs(AUTHOR_PARAMETER)
If Block IsNot Nothing And AuthorParam IsNot Nothing Then
If Not String.IsNullOrEmpty(AuthorParam.DisplayString) And AuthorParam.DisplayString = "Author Name" Then
Result = True
End If
End If
Block = Nothing
AuthorParam = Nothing
Return Result
End Function
End Class

Now, create new class module under the SEStudio1 folder and name it SEStudio1RelayInfo.vb. Then, copy and paste the codes below to SEStudio1RelayInfo.vb class module.

    Private _FileType As String
Private _FormatVersion As String
Private _RelayType As String
Private _ModelNumber As String
Private _SerialNumber As String

Public Sub New()

End Sub

Public Sub New(ByVal FileType As String, ByVal FormatVersion As String, ByVal RelayType As String, ByVal ModelNumber As String, ByVal SerialNumber As String)
_FileType = FileType
_FormatVersion = FormatVersion
_RelayType = RelayType
_ModelNumber = ModelNumber
_SerialNumber = SerialNumber
End Sub

Public Property FileType As String
Get
Return _FileType
End Get
Set(value As String)
_FileType = value
End Set
End Property

Public Property FormatVersion As String
Get
Return _FormatVersion
End Get
Set(value As String)
_FormatVersion = value
End Set
End Property

Public Property RelayType As String
Get
Return _RelayType
End Get
Set(value As String)
_RelayType = value
End Set
End Property

Public Property ModelNumber As String
Get
Return _ModelNumber
End Get
Set(value As String)
_ModelNumber = value
End Set
End Property

Public Property SerialNumber As String
Get
Return _SerialNumber
End Get
Set(value As String)
_SerialNumber = value
End Set
End Property

In the next tutorial, I will show you how to create a dialog box for confirming or showing that the setting file has been open successfully and the setting is ready for upload.

See you nextime.


Comments

Popular posts from this blog

Micom SE Studio1 Import Filter - Creating User Interface (UI)

Welcome to my page and welcome to the continuation of Omicron Import Filter tutorial series. In this tutorial, I will show you how to create the actual import filter fom Micom relays. In this tutorial, we will focus on the Visual Studio program. We're going to modify the codes in our project called MyImportFilter that we've created in the previous tutorial.  Download the project in this link  MyImportFilter - Process Relay Setting Parameters . Extract and open the project. Once the project is loaded, add New Folder inside the project and set the name to SEStudio1. We need this to make organize our project class filter.  SE Studio 1 stands for Schneider Electric Studio 1 which is the software that used in communicating MiCOM relays particularly P12x series. And yes we're going to create a new import filter and user interface form MiCOM P12x series relay. I think this will applied to other MiCOM P series relay. Add a new Form inside the  SEStudio1 folder...

Change Data With Feedback In Omicron Control Center Custom Dialog

Welcome to the fifth and final part of the tutorial series about Omicron Control Center (OCC) Custom Dialog. In this tutorial, I will show you how to get a real-time feedback when data was change. This will be helpful that you will be notified what will be the outcome of the changed data. Check the video below. Now, open the OCC document that we used in the previous tutorial. If you don't have it check this link ( Omicron Control Center Custom Dialog - Creating Custom Dialog With Dropdown Control ) then come back here once you have OCC document. When the document is loaded, open the script view by clicking the Script View button under the View tab then stop the script if its running. Now, find the  SetTheSourceController sub procedure. We're going to modify this codes and use different methods of loading data from the test object and saving back to test object. Point the mouse pointer and click between  Begin Dialog and  End Dialog then click the Edit Dialog button un...

Processing The Relay Setting Parameters In Omicron Import Filter

Welcome to my page and welcome to the fifth part of Omicron Import Filter tutorial series. In this tutorial, I will show you how to process the relay setting parameters that to be import in the Xrio converter. In this tutorial, we will focus on the Visual Studio program. We're going to modify the codes in our project called MyImportFilter that we've created in the previous tutorial.  Download the project in this link  MyImportFilter - Process Relay Setting Parameters . Extract and open the project. Once the project is loaded, add New Folder inside the project and set the name to SEStudio1. We need this to make organize our project class filter.  SE Studio 1 stands for Schneider Electric Studio 1 which is the software that used in communicating MiCOM relays particularly P12x series. And yes we're going to create a new import filter and user interface form MiCOM P12x series relay. I think this will applied to other MiCOM P series relay. Add a new Form inside ...