Skip to main content

Creating A User Interface In Omicron Test Universe Import Filter

Welcome to my page. This is the third part of the Omicron Import Filter tutorial series. In this tutorial, I will show you how to create a User Interface (UI) inside the Import Filter. UI will be helpful to see the activities during import like in the image below. Unlike the traditional way, it just open the setting file then wait until the setting files populated in the test object and wait until the confirmation of completion.


Now open the MyImportFilter project in Visual Studio that we've created in the previous tutorial which can be found here (Omicron Import Filter - Create New Filter and Omicron Import Filter - Install And Use Newly Created Import Filter). Check those tutorials if you haven't done creation of the project.


Now add new form by clicking Add Form (Windows Forms) in the Project menu or right clicking in the MyImportFilter project at the solution explorer then selecting Add > Form (Windows Forms). Set the name to FormSample.vb then click Add button.

Once the new form added, set the following properties below
  • Text - My Import Filter Dialog
  • StartPosition - CenterScreen
  • MinimizeBox - False
  • MaximizeBox - False
  • FormBorderStyle - FixedDialog

Add the following controls and arrange them like in the image below
  • Textbox - 1
  • Label - 1
  • Pushbutton - 3
  • DataGridView - 1

Set the the following controls' properties
  • Textbox1, set the Name to TextboxFilename and ReadOnly to True
  • Button1, set the Name to ButtonBrowseFile and Text to &Browse
  • DataGridView1, set the Name to DataGridViewParameters
  • Label1, set the Name to LabelStatusMessage and clear the text content
  • Button2, set the Name to ButtonCancel and Text to &Cancel
  • Button3, set the Name to ButtonOK and Text to &OK
  • FormSample, set the AcceptButton to ButtonOK and CancelButton to ButtonCancel

Open the FormSample code window and copy the codes below and paste it to inside the FormSample class.

Private Document As OMXRioData.IAutoXRioDocument

Public Sub DisplayForm(ByVal pDocument As OMXRioData.IAutoXRioDocument)
Document = pDocument
ShowDialog()
End Sub

Private Sub ButtonOK_Click(sender As Object, e As EventArgs) Handles ButtonOK.Click
DialogResult = Windows.Forms.DialogResult.OK
End Sub

Private Sub ButtonCancel_Click(sender As Object, e As EventArgs) Handles ButtonCancel.Click
DialogResult = Windows.Forms.DialogResult.Cancel
End Sub

Open the SampleFilter class and copy the codes below then replace the ShowParameterDialog procedure.

Public Overrides Function ShowParameterDialog(isImport As Boolean) As Boolean
Dim Result As Boolean = False
Using dlg As New FormSample
With dlg
dlg.DisplayForm(Document)
If .DialogResult = Windows.Forms.DialogResult.OK Then
MsgBox("The import filter was successfully executed.", MsgBoxStyle.OkOnly, "Import Filter")
Result = True
End If
End With
End Using
Return Result
End Function

Now, compile or build the project and install the output class to the XRIO directory. To see how to install and execute the new Import Filter check this link (Omicron Import Filter - Install And Use Newly Created Import Filter) .


We have successfully executed the newly modified Import Filter. In the next tutorial, I will show you how to open, read and parse relay setting file particularly in MiCOM P12x relay. I will show you how to manipulate the relay setting file to import the parameters easily. See you next time.


Comments

Popular posts from this blog

Display Test Object Data In Omicron Control Center Custom Dialog

Welcome to the second part of the tutorial series about  Omicron Control Center (OCC) Custom Dialog. In this tutorial, I will show you how to retrieve the data from the OCC document test object and display it to the custom dialog. Now, open the OCC document that created in the first part of this series. If you don't have it, please check the first part of the series ( Omicron Control Center Custom Dialog - Creating Custom Dialog ). Follow the step by step procedure there to create the a OCC document then return to this page. Before we start writing coding, we have to add Omicron libraries to reference of the existing OCC document. In the View tab and under the Document Views group, click the Script View button to open the scripts we've created in the previous tutorial. Stop the script by clicking the Stop Script button under the Run Script group to enable us to edit or modify the script. Click the References button then the reference dialog will open. In the reference list,...

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 ...

Using User Defined Field In Omicron Control Center Document

Welcome to my tutorial page. In this tutorial, I will show you how to use UserDefined field in the OCC document.  In the Report View of the Control Center, you can customize your overall report. Test modules may be embedded in the report, and run from it. One report can be used as a standard template to retest and compare one or more test objects. Example, by inserting basic field like page number, page count, page title and etc. UserDefined field is basically the same with the basic field but it can only use programmatically. Because if insert UserDefined field it will display nothing or empty. So, this is the tutorial all about, how to use these fields.  Now download this file  Omicron Control Center - UserDefined Field . This file was created in the previous tutorial series called Omicron Control Center Custom Dialog using Test Universe 4.20. If you can't open this file, your software might be outdated. You have to upgrade you Test Universe to version 4.20 or chec...