You are on page 1of 114

27

TEST UNIVERSE

Advanced Distance
Automation Interface
OMICRON Test Universe

Manual Version: AdvDistAut.AE.3 - Year 2010


© OMICRON electronics. All rights reserved.
This manual is a publication of OMICRON electronics GmbH.
All rights including translation reserved. Reproduction of any kind, e.g., photocopying, microfilming,
optical character recognition and/or storage in electronic data processing systems, requires the explicit
consent of OMICRON electronics. Reprinting, wholly or in part, is not permitted.
The product information, specifications, and technical data embodied in this manual represent the
technical status at the time of writing and are subject to change without prior notice.
We have done our best to ensure that the information given in this manual is useful, accurate and
entirely reliable. However, OMICRON electronics does not assume responsibility for any inaccuracies
which may be present.
The user is responsible for every application that makes use of an OMICRON product.

2
Contents

Contents

Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
Object Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Application Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Document Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
TestSettings Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
FaultTypes Collection Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
FaultType Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Shots Collection Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Shot Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
SearchLines Collection Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
SearchLine Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Reaches Collection Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Reach Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

3
OMICRON Test Universe

CheckLines Collection Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91


Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
CheckLine Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Constants Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

4
Advanced Distance Automation Interface

Advanced Distance Automation


Interface
Object Hierarchy
An Advanced Distance Document contains two different objects (refer to
figure 1):

1 Test Settings: it defines the test model and the test parameters.
2 Fault Types Collection: there are 7 fault types in a test:
L1N, L2N, L3N, L1L2, L2L3, L3L1 L1L2L3.

Figure 1:
Object hierarchy of an
Advanced Distance
Document

5
OMICRON Test Universe

A FaulType object contains 3 different objects:

3 Shots collection
4 SearchLines collection
5 CheckLines collection

Each FaultType has 1 to n Shot objects, has 1 to n SearchLine objects, and has
1 to n CheckLine objects.
Each SearchLine object has 1 to n Reach objects.

Reference
Application Object
Properties
Application (read only)
The application object is the root of the OMICRON Advanced Distance object
hierarchy. It is the only object that can be created directly by other OLE
Automation controllers (e.g. MS Excel using CreateObject).
This object is unique within the OMICRON Advanced Distance Module. If you
want to create another Application object with CreateObject, a new instance of
the OMICRON Advanced Distance program is started to handle this object.
You can use this object as a starting point to navigate through the hierarchy tree.
You can get references to the Document Object (Document) and the Predefined
Constant Values (Constants) objects.

6
Advanced Distance Automation Interface

Constants (read only)

Syntax: object.Constants

Type: Object (Constants)

Description: Returns the object with the constant values (Constants) you
can use with several functions.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim constants As Object
Set constants = dist.Constants

Document (read only)

Syntax: object.Document

Type: Object (Document)

Description: This property returns a Document Object (Document).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim doc As Object
Set doc = dist.Document

7
OMICRON Test Universe

Name (read only)

Syntax: object.Name

Type: String

Description: Returns the name of the application.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim Str As String
Set Str = dist.Name

Parent (read only)

Syntax: object.Parent

Type: Object

Description: This property always returns the parent object in the object
hierarchy. In this case it is the Application Object
(Application).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim obj As Object
Set obj = dist.Parent

8
Advanced Distance Automation Interface

Visible

Syntax: object.Visible

Type: Boolean

Description: Shows/hides the main application window.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
'Is the application visible ?
If dist.Visible then
MsgBox "Application is visible"
Else'Make the application visible
dist.Visible = TRUE
End If

Note: If you use an external OLE Automation controller (e.g. OMICRON Con-
trol Center) and you create the Application Object (Application) (and start the
OMICRON Advanced Distance application) you have to set the visible property
to TRUE to see the main window of the application.

9
OMICRON Test Universe

Methods
Quit

Syntax: object.Quit

Return type: None

Description: This command quits the OMICRON Advanced Distance


application and closes all open windows and the document.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
dist.Quit

10
Advanced Distance Automation Interface

Document Object
With the Document Object (Document) you can control the document.
From this object you can get references to the Fault Types Collection Object
(FaultTypes), the Test Settings Object (TestSettings).

Properties
Application (read only)

Syntax: Object.Application
Type: Object (Application)
Description: Returns the Application Object (Application).
Example: Dim otm As Object
Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim app As Application
Set app = dist.Document.Application

Comment

Syntax: object.Comment
Type: String
Description: This property allows access to the comment string which can
be shown in the report.
Example: Dim otm As Object
Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
'Set comment
dist.Document.Comment = "This test is
simulated."

11
OMICRON Test Universe

Parent (read only)

Syntax: object.Parent

Type: Object

Description: This property always returns the parent object in the object
hierarchy. In this case it is the Application Object
(Application).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim obj As Object
Set obj = dist.Document.Parent

FaultTypes (read only)

Syntax: object.FaultTypes

Type: Object (FaultTypes)

Description: This property returns the Fault Types Collection Object


(FaultTypes) of the document. With this object you can
access to the the Fault Types in your document. This
collection contains 7 elements and has no New or Add
method.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim FaultTypes As Object
Set FaulTypes = dist.Document.FaultTypes

12
Advanced Distance Automation Interface

Shot

Syntax: object.Shot

Type: Object (Shot)

Description: This property returns a shot object (Shot). The returned shot
object can be modified but the changes do not affect the test.

Example: ’ This example shows how to find out


’ nominal trip times for specific
’ locations at the line
Dim otm As Object
Dim dist As Object
Dim const As Object
Dim loc As Integer
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim shot As Object
Set shot = dist.Document.Shot
Set const = dist.Constants
shot.ShotType = const.STRelative
shot.ZoneKey = 1 ’line length
For loc = 10 To 370 Step 40
shot.PercentZone = loc
MsgBox("Loc.: " & loc & "%: TNom = " &
shot.TNom)
Next

13
OMICRON Test Universe

TestSettings

Syntax: object.TestSettings

Type: Object

Description: This property returns the test settings object.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim obj As Object
Set obj = dist.Document.TestSettings

14
Advanced Distance Automation Interface

Methods
RemoveAllAll

Syntax: object.RemoveAllAll

Type: None

Description: This method removes all shots and lines for all fault types

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
'Remove all shots and lines
dist.Document.RemoveAllAll

RemoveAllChecks

Syntax: object.RemoveAllChecks

Type: None

Description: This method removes all check lines for all fault types

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
'Remove all check lines
dist.Document.RemoveAllChecks

15
OMICRON Test Universe

RemoveAllSearches

Syntax: object.RemoveAllSearches

Type: None

Description: This method removes all search lines for all fault types

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
'Remove all search lines
dist.Document.RemoveAllSearches

RemoveAllShots

Syntax: object.RemoveAllShots

Type: None

Description: This method removes all shots for all fault types

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
'Remove all shots
dist.Document.RemoveAllShots

16
Advanced Distance Automation Interface

TestSetDefaults

Syntax: object.TestSetDefaults

Type: None

Description: This method has the same effect as pressing the “Set
Defaults” button on the Test Settings page. It loads the default
test settings defined in the Test Object.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
' Set defaults
dist.Document.TestSetDefaults

U
pdateAllViews

Syntax: object.UpdateAllViews(hint)
Long hint

Type: None

Description: This method updates the UI and the report. The optional Hint
parameter specifies which view becomes the update. By
calling this method without parameter, all the UI is updated.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
dist.FaultTypes(1).Shots.Add
dist.Document.UpdateAllViews

17
OMICRON Test Universe

TestSettings Object
Properties
AllowReduction

Syntax: object.AllowReduction

Type: Boolean

Description: Get/Set the allow-reduction-of-Itest flag.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
‘Allow reduction of Itest
dist.Document.TestSettings.AllowReduction =
True

CBSimulationON

Syntax: object.CBSimulationON

Type: Boolean

Description: Get/Set the CB-Simulation-ON flag.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
‘CB simulation ON
dist.Document.TestSettings.CBSimulationON =
True

18
Advanced Distance Automation Interface

DCOffset

Syntax: object.DCOffset

Type: Boolean

Description: Get/Set the DC-Offset flag.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
‘Set DC offset
dist.Document.TestSettings.DCOffset = True

ExtendedZonesActive

Syntax: object.ExtendedZonesActive

Type: Boolean

Description: Get/Set the Extended-Zone-Active flag.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
‘Extended zones are active
dist.Document.TestSettings.ExtendedZonesActive
= True

19
OMICRON Test Universe

FaultInceptionAngle

Syntax: object. FaultInceptionAngle


Type: Double
Description: Get/Set the fault inception angle. The unit is degree.
Example: Dim otm As Object
Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
‘Set the fault inception angle to 30.5°
dist.Document.TestSettings.FaultInceptionAngle
= 30.5

20
Advanced Distance Automation Interface

FaultInceptionMode

Syntax: object. FaultInceptionMode


Type: Long
Description: Get/Set the fault inception mode.
Possible values are (see Constants object):
FIMFixed
FIMMaximum
FIMRandom
FIMZero
Example: Dim otm As Object
Dim dist As Object
Dim distConst As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Set distConst = dist.Constants
‘Set the fault inception mode to random
dist.Document.TestSettings.FaultInceptionMode
= distConst.FIMRandom

21
OMICRON Test Universe

IgnoreNominalChar

Syntax: object. IgnoreNominalChar

Type: Boolean

Description: Get/Set the ignore-nominal-characteristic flag.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
‘Ignore nominal characteristic
dist.Document.TestSettings.IgnoreNominalChar
= True

IVTest

Syntax: object.IVTest

Type: Double

Description: This property specifies the test current or the test voltage
(depending on the test mode).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
dist.Document.TestSettings.IVTest = 5.0

22
Advanced Distance Automation Interface

KSMag

Syntax: object.KSMag

Type: Double

Description: This property specifies the magnitude of the KS factor.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
dist.Document.TestSettings.KSMag = 1.0

KSAngle

Syntax: object.KSAngle

Type: Double

Description: This property specifies the angle of the KS factor. The unit
is °.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
dist.Document.TestSettings.KSAngle = 0.0

23
OMICRON Test Universe

MaxFaultTime

Syntax: object.MaxFaultTime

Type: Double

Description: This property specifies the max-fault time in second.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
dist.Document.TestSettings.MaxFaultTime = 2.5

PostFaultTime

Syntax: object.PostFaultTime

Type: Double

Description: This property specifies the post-fault time in second.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
dist.Document.TestSettings.PostFaultTime =
0.5

24
Advanced Distance Automation Interface

PreFaultTime

Syntax: object.PreFaultTime

Type: Double

Description: This property specifies the pre-fault time in second.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
dist.Document.TestSettings.PreFaultTime = 1.0

SearchInterval

Syntax: object.SearchInterval

Type: Double

Description: This property specifies the search interval. The unit is Ohm.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
dist.Document.TestSettings.SearchInterval =
0.2

25
OMICRON Test Universe

SearchIntervalAbs

Syntax: object.SearchResolutionAbs

Type: Double

Description: This property specifies the absolute search resolution. The


unit is Ohm.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
dist.Document.TestSettings.SearchResolutionAbs
= 0.05

SearchIntervalRel

Syntax: object.SearchResolutionAbs

Type: Double

Description: This property specifies the relative search resolution. The unit
is %.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
dist.Document.TestSettings.SearchResolutionRel
= 1.0

26
Advanced Distance Automation Interface

SwitchOffAtZeroCrossing

Syntax: object.SwitchOffAtZeroCrossing

Type: Boolean

Description: Get/Set the switch off at zero crossing flag.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
‘CB simulation ON
dist.Document.TestSettings.SwitchOffAtZero
Crossing= True

TestMode

Syntax: object.TestMode

Type: Long

Description: This property specifies the test mode.


Possible values are (see Constants object):
TMConstantCurrent
TMConstantVoltage
TMConstantSourceImp

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
dist.Document.TestSettings.TestMode =
dist.Constants.TMConstantCurrent

27
OMICRON Test Universe

TimeReference

Syntax: object.TimeReference

Type: Long

Description: This property specifies the time reference.


Possible values are (see Constants object):
TRFaultInception
TRStarting

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
dist.Document.TestSettings.TimeReference =
dist.Constants.TRStarting

ZSMag

Syntax: object.ZSMag

Type: Double

Description: This property specifies the ZS magnitude. The unit is Ohm.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
dist.Document.TestSettings.ZSMag = 2.0

28
Advanced Distance Automation Interface

ZSAngle

Syntax: object.ZSAngle

Type: Double

Description: This property specifies the ZS angle. The unit is °.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
dist.Document.TestSettings.ZSAngle = 30.0

29
OMICRON Test Universe

Methods
TestSetDefaults

Syntax: object.TestSetDefaults

Type: None

Description: This method has the same effect as pressing the “Set
Defaults” button on the Test Settings page. It loads the default
test settings defined in the Test Object.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
' Set default test settings
dist.Document.TestSettings.TestSetDefaults

30
Advanced Distance Automation Interface

FaultTypes Collection Object


Properties
Application (read only)

Syntax: object.Application

Type: Object (Application)

Description: Returns the Application Object (Application).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim app As Application
Set app =
dist.Document.FaultTypes.Application

31
OMICRON Test Universe

Count (read only)

Syntax: object.Count

Type: Long

Description: This property returns the number of fault types in the


document.
Note: By design there is always 7 fault types.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
'Count twice
Dim s As Object
Dim ss As Object
i = 0
Set ss = dist.Document.FaultTypes
For Each s in ss
i = i+1
Next
If i = ss.Count then
MsgBox "We've counted twice"
End If

32
Advanced Distance Automation Interface

Parent (read only)

Syntax: object.Parent

Type: Object

Description: This property always returns the parent object in the object
hierarchy. In this case it is the Document Object (Document).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMAdist.Document”)
Set dist = otm.Specific
Dim obj As Object
Set obj = dist.Document.FaultTypes.Parent

33
OMICRON Test Universe

Methods
Add

Syntax: object.Add

Return type: Object (State)

Description: Not supported.

Item (default property)

Syntax: object.Item(Index)

Return type: Object (FaultType/FaultTypes)

Description: This method returns a Fault Type Object (FaultType) from


the FaultTypes Collection. The index is the number of the
fault types in the document (between 1 and
FaultTypes.Count). If no index is given, the FaultTypes
Collection Object (FaultTypes) is returned.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
'Get FaultTypes object
Dim FaultTypes As Object
set FaultTypes = dist.Document. FaultTypes
'Get FaultType object 2
Dim FT2 As Object
Set FT2 = FaultTypes.Item(2)

34
Advanced Distance Automation Interface

Remove

Syntax: object.Remove

Return type: None

Description: Not supported.

35
OMICRON Test Universe

FaultType Object
Properties
CheckLines (read only)

Syntax: object.CheckLines

Type: Object (CheckLines)

Description: This property returns the Check Lines Collection Object


(CheckLines) of a given Fault Type Object (FaultType).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject("OMAdist.Document")
Set dist = otm.Specific
Dim checklines As Object
Set checklines =
dist.Document.FaultType(1).CheckLines

FTString (read only)

Syntax: object.FTString

Type: String

Description: This property returns the Fault Type string.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMAdist.Document”)
Set dist = otm.Specific
Dim strFT As string
strFT = dist.Document.FaultType(1).FTString

36
Advanced Distance Automation Interface

SearchLines (read only)

Syntax: object.SearchLines

Type: Object (SearchLines)

Description: This property returns the Search Lines Collection Object


(SearchLines) of a given Fault Type Object (FaultType).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMAdist.Document”)
Set dist = otm.Specific
Dim searchlines As Object
Set searchlines =
dist.Document.FaultType(1).SearchLines

Shots (read only)

Syntax: object.Shots

Type: Object (Shots)

Description: This property returns the Shots Collection Object (Shots) of a


given Fault Type Object (FaultType).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMAdist.Document”)
Set dist = otm.Specific
Dim shots As Object
Set shots = dist.Document.FaultType(1).Shots

37
OMICRON Test Universe

Shots Collection Object


Properties
Application (read only)

Syntax: object.Application

Type: Object (Application)

Description: Returns the Application Object (Application).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim app As Application
Set app =
dist.Document.FaultTypes(1).Shots.Application

Count (read only)

Syntax: object.Count

Type: Long

Description: This property returns the number of shots.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
MsgBox "Number of shots in fault type L1N: " &
dist.Document.FaultTypes(1).Shots.Count

38
Advanced Distance Automation Interface

Parent (read only)

Syntax: object.Parent

Type: Object

Description: This property always returns the parent object in the object
hierarchy. In this case it is the Fault Type Object (FaultType).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim obj As Object
Set obj =
dist.Document.FaultTypes(1).Shots.Parent

39
OMICRON Test Universe

Methods
Add

Syntax: object.Add

Return type: +

Description: This method adds a shot to the Shots collection and returns
the created Shot Object (Shot).

AddRelative

Syntax: object.AddRelative (Phi, PercentZone, ZoneKey)


Double Phi
Double PercentZone
Long ZoneKey

Return type: Object (Shot)

Description: This method adds a relative shot to the Shots collection and
returns the created Shot Object (Shot).

AddRX

Syntax: object.AddRX(R, X)
Double R
Double X

Return type: Object (Shot)

Description: This method adds an absolute shot to the Shots collection


and returns the created Shot Object (Shot).

40
Advanced Distance Automation Interface

AddZPhi

Syntax: object.AddZPhi(Z, Phi)


Double Z
Double Phi

Return type: Object (Shot)

Description: This method adds an absolute shot to the Shots collection


and returns the created Shot Object (Shot).

Remove

Syntax: object.Remove(index)
Long index

Return type: none

Description: This method removes the specified shot from the Shots
collection.

41
OMICRON Test Universe

RemoveAll

Syntax: object.RemoveAll

Return type: none

Description: This method removes all the shots from the Shots collection.

Item (default property)

Syntax: object.Item(index)
Long index

Return type: Object (Shot)

Description: This method returns a Shot Object (Shot) from the Shots
Collection. The parameter is the shot index in the collection.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set shot = otm.Specific
'Set R of first L1N shot to 2 Ohm
Dim shot As Object
Set shot =
dist.Document.FaultTypes(dist.Constants.FTL1
N).Shot(1)
shot.R = 2.0

42
Advanced Distance Automation Interface

ItemIndex

Syntax: object.ItemIndex(Index)
Variant Index – Index number of the shot.

Return type: Object (Shot)

Description: This method returns a Shot Object (Shot) from the Shots
Collection. The index is the number of the shot in the
collection (between 1 and Shots.Count).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
'Set X of first three shots to 0
Dim shotFT As Object
Set shotFT = dist.Document.FaultTypes(1)
For i = 1 To 3
shotFT.Shots.ItemIndex(i).X = 0.0
Next i

43
OMICRON Test Universe

Shot Object
Properties
Dev (read only)

Syntax: object.Dev

Type: Double

Description: This property returns the time deviation in %.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim shots As Object
Set shots =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).Shots
shots.AddRX(0,1)
otm.Test
Dim dev As double
dev = shots(1).Dev

44
Advanced Distance Automation Interface

IsFailed (read only)

Syntax: object.IsFailed

Type: Boolean

Description: This property returns True if the shot has failed.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim shots As Object
Set shots =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).Shots
shots.AddRX(0,1)
otm.Test
If shots(1).IsFailed then MsgBox(“Test
failed”)

45
OMICRON Test Universe

IVTest (read only)

Syntax: object.IVTest

Type: Double

Description: This property returns the test current or the test voltage
(depending on the test mode).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim shots As Object
Set shots =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).Shots
shots.AddRX(0,1)
Dim IVTest As double
IVTest = shots(1).IVTest

46
Advanced Distance Automation Interface

PercentZone

Syntax: object.PercentZone

Type: Double

Description: This property gets/sets the percentage of zone for a relative


shot.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim shots As Object
Set shots =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).Shots
Dim shot As Object
Set shot = shots.Add
shot.PercentZone = 110 ‘110%

47
OMICRON Test Universe

Phi

Syntax: object.Phi

Type: Double

Description: This property specifies the shot angle. The unit is degree.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim shots As Object
Set shots =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).Shots
Dim shot As Object
Set shot = shots.Add
shot.Z = 1.0
shot.Phi = 45.0

Phi1FaultInc

Syntax: object.Phi1FaultInc

Type: Double

Description: This property returns the fault inception angle on phase one.
The unit is degree.

48
Advanced Distance Automation Interface

Syntax: object.R

Type: Double

Description: This property specifies the R value of the shot. The unit is
Ohm.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
'Set R of L2N to 2 Ohm
Dim shot As Object
Set shot =
dist.Document.FaultTypes(dist.Constants.FTL2N
).Shots(1)
shot.R = 2.0

49
OMICRON Test Universe

ShotType

Syntax: object.ShotType

Type: Long

Description: This property specifies the shot type (absolute or relative).


Possible values are:
STAbsolute
STRelative

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim shots As Object
Set shots =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).Shots
Dim shot As Object
Set shot = shots.Add
shot.ShotType = dist.Constants.STRelative

50
Advanced Distance Automation Interface

Status (read only)

Syntax: object.Status

Type: Long

Description: This property returns the shot status.


Possible values are:
SSFailed
SSNotTested

See Constants object for complete list.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim shots As Object
Set shots =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).Shots
Dim shot As Object
Set shot = shots.Add
If shot.Status = dist.Constants.SSNotTested
Then
MsgBox(“Not Tested”)
End If

51
OMICRON Test Universe

StatusString (read only)

Syntax: object.StatusString(format)

Type: String format

Description: This property returns the shot status string.


The format parameter is used to format the returned string.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim shots As Object
Set shots =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).Shots
Dim shot As Object
Set shot = shots.Add
MsgBox(shot.StatusString(“Status: %s”))

52
Advanced Distance Automation Interface

TAct (read only)

Syntax: object.TAct

Type: Double

Description: This property returns the actual zone time in s.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim shots As Object
Set shots =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).Shots
shots.AddRX(1,0)
otm.Test
Dim tact As double
tact = shots(1).TAct

53
OMICRON Test Universe

TMax (read only)

Syntax: object.TMax

Type: Double

Description: This property returns the maximum zone time in s according


to the time tolerance.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim shots As Object
Set shots =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).Shots
shots.AddRX(1,0)
otm.Test
Dim tmax As double
tmax = shots(1).TMax

54
Advanced Distance Automation Interface

TMin (read only)

Syntax: object.TMin

Type: Double

Description: This property returns the minimum zone time in s according to


the time tolerance.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim shots As Object
Set shots =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).Shots
shots.AddRX(1,0)
otm.Test
Dim tmin As double
tmin = shots(1).TMin

55
OMICRON Test Universe

Syntax: object.X

Type: Double

Description: This property specifies the X value of the shot.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
'Set X of L2N to 2 Ohm
Dim shot As Object
Set shot =
dist.Document.FaultTypes(dist.Constants.FTL2N
).Shots(1)
shot.X = 2.0

56
Advanced Distance Automation Interface

Syntax: object.Z

Type: Double

Description: This property specifies the Z value. The unit is degree.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim shots As Object
Set shots =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).Shots
Dim shot As Object
Set shot = shots.Add
shot.Z = 1.0
shot.Phi = 45.0

57
OMICRON Test Universe

ZeroCrossing

Syntax: object.ZeroCrossing

Type: Boolean

Description: This property specifies the zero-crossing flag.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim shots As Object
Set shots =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).Shots
shots.Add
shots(1).ZeroCrossing = True

58
Advanced Distance Automation Interface

ZoneKey

Syntax: object.ZoneKey

Type: Long

Description: This property specifies the zone-key, the zone index used for
a relative shot.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim shots As Object
Set shots =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).Shots
shots.Add
shots(1).ZoneKey = 1

59
OMICRON Test Universe

SearchLines Collection Object


Properties
Application (read only)

Syntax: object.Application

Type: Object (Application)

Description: Returns the Application Object (Application).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim app As Application
Set app =
dist.Document.FaultTypes(1).SearchLines.Appli
cation

Count (read only)

Syntax: object.Count

Type: Long

Description: This property returns the number of search lines.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
MsgBox "Number of shots in fault type L1N: " &
dist.Document.FaultTypes(1).SearchLines.Count

60
Advanced Distance Automation Interface

Parent (read only)

Syntax: object.Parent

Type: Object

Description: This property always returns the parent object in the object
hierarchy. In this case it is the Fault Type Object (FaultType).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim obj As Object
Set obj =
dist.Document.FaultTypes(1).SearchLines.Parent

61
OMICRON Test Universe

Methods
Add

Syntax: object.Add

Return type: Object (SearchLine)

Description: This method adds a search line to the SearchLines


collection and returns the created search line Object
(SearchLine).

AddRelRX

Syntax: object.AddRelRX(R, X, Angle, PercentZone, ZoneKey)


Double R
Double X
Double Angle
Double PercentZone
Long ZoneKey

Return type: Object (SearchLine)

Description: This method adds a relative search line to the SearchLines


collection and returns the created search line Object
(SearchLine).

62
Advanced Distance Automation Interface

AddRelZPhi

Syntax: object.AddRelZPhi(Z, Phi, Angle, PercentZone, ZoneKey)


Double Z
Double Phi
Double Angle
Double PercentZone
Long ZoneKey

Return type: Object (SearchLine)

Description: This method adds a relative search line to the SearchLines


collection and returns the created search line Object
(SearchLine).

AddRX

Syntax: object.AddRX(R, X, Angle, Length)


Double R
Double X
Double Angle
Double Length

Return type: Object (SearchLine)

Description: This method adds an absolute search line to the


SearchLines collection and returns the created search line
Object (SearchLine).

63
OMICRON Test Universe

AddZPhi

Syntax: object.AddZPhi(Z, Phi, Angle, Length)


Double Z
Double Phi
Double Angle
Double Length

Return type: Object (SearchLine)

Description: This method adds an absolute search line to the


SearchLines collection and returns the created search line
Object (SearchLine).

Remove

Syntax: object.Remove(index)
Long index

Return type: none

Description: This method removes the specified search line from the
SearchLines collection.

RemoveAll

Syntax: object.RemoveAll

Return type: none

Description: This method removes all the search lines from the
SearchLines collection.

64
Advanced Distance Automation Interface

Item (default property)

Syntax: object.Item(index)
Long index

Return type: Object (SearchLine)

Description: This method returns a search line Object (SearchLine) from


the SearchLines Collection. The parameter is the search line
index in the collection.

ItemIndex

Syntax: object.ItemIndex(Index)
Variant Index – Index number of the search line.

Return type: Object (SearchLine)

Description: This method returns a Search Line Object (SearchLine) from


the SearchLines Collection. The index is the number of the
search lines in the collection (between 1 and
SearchLines.Count).

65
OMICRON Test Universe

SearchLine Object
Properties
Absolute

Syntax: object.Absolute

Type: Boolean

Description: This property specifies if the search line is absolute (True).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim searchlines As Object
Set searchlines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).searchlines
searchlines.Add
searchlines(1).Absolute = False

66
Advanced Distance Automation Interface

Angle

Syntax: object.Angle

Type: Double

Description: This property specifies the search line angle. The unit is
degree

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim searchlines As Object
Set searchlines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).searchlines
searchlines.Add
searchlines(1).Angle = 45.0

67
OMICRON Test Universe

IsFailed (read only)

Syntax: object.IsFailed

Type: Boolean

Description: This property returns True if the search line test has failed.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim searchlines As Object
Set searchlines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).searchlines
searchlines.Add
otm.Test
If searchlines(1).IsFailed then MsgBox(“Test
failed”)

68
Advanced Distance Automation Interface

Length

Syntax: object.Length

Type: Double

Description: This property specifies the search line length. The unit is Ohm

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim searchlines As Object
Set searchlines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).searchlines
searchlines.Add
searchlines(1).Length = 1.0

69
OMICRON Test Universe

PercentZone

Syntax: object.PercentZone

Type: Double

Description: This property specifies the zone percent of a relative search


line. The unit is %

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim searchlines As Object
Set searchlines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).searchlines
searchlines.Add
searchlines(1).Percent = 95.0

70
Advanced Distance Automation Interface

Phi

Syntax: object.Phi

Type: Double

Description: This property specifies the angle of the search line origine.
The unit is degree.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim searchlines As Object
Set searchlines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).SearchLines
Dim searchline As Object
Set searchline = searchlines.Add
searchline.Z = 1.0
searchline.Phi = 45.0

71
OMICRON Test Universe

Syntax: object.R

Type: Double

Description: This property specifies the R value of the search line origine.
The unit is Ohm.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Set searchlines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).SearchLines
Dim searchline As Object
Set searchline = searchlines.Add
searchline.R = 1.0

72
Advanced Distance Automation Interface

Status (read only)

Syntax: object.Status

Type: Long

Description: This property returns the search line status.


Possible values are:
SSFailed
SSNotTested

See Constants object for complete list.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim searchlines As Object
Set searchlines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).searchlines
Dim searchline As Object
Set searchline = searchlines.Add
If searchlines.Status =
dist.Constants.SSNotTested Then
MsgBox(“Not Tested”)
End If

73
OMICRON Test Universe

Reaches (read only)

Syntax: object.Reaches

Type: Object (Reaches)

Description: This property returns the Reaches Collection Object


(Reaches) of a given Search Line Object (SearchLine).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMAdist.Document”)
Set dist = otm.Specific
Dim reaches As Object
Set reaches =
dist.Document.FaultType(1).SearchLines(1).
reaches

74
Advanced Distance Automation Interface

Syntax: object.X

Type: Double

Description: This property specifies the X value of the search line origine.
The unit is Ohm.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Set searchlines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).SearchLines
Dim searchline As Object
Set searchline = searchlines.Add
searchline.X = 1.0

75
OMICRON Test Universe

Syntax: object.Z

Type: Double

Description: This property specifies the Z value of the search line origine.
The unit is Ohm.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Set searchlines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).SearchLines
Dim searchline As Object
Set searchline = searchlines.Add
searchline.Z = 1.0

76
Advanced Distance Automation Interface

ZoneKey

Syntax: object.ZoneKey

Type: Long

Description: This property specifies the zone-key, the zone index of a


relative search line.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Set searchlines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).SearchLines
Dim searchline As Object
Set searchline = searchlines.Add
searchline.ZoneKey = 2

77
OMICRON Test Universe

Reaches Collection Object


Properties
Application (read only)

Syntax: object.Application

Type: Object (Application)

Description: Returns the Application Object (Application).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Set searchlines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).SearchLines
Dim searchline As Object
Set searchline = searchlines.Add
Dim app As Application
Set app = searchline.Reaches.Application

78
Advanced Distance Automation Interface

Count (read only)

Syntax: object.Count

Type: Long

Description: This property returns the number of search lines.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Set searchlines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).SearchLines
Dim searchline As Object
Set searchline = searchlines.Add
MsgBox "Number of reaches: " &
searchline.Reaches.Count

79
OMICRON Test Universe

Parent (read only)

Syntax: object.Parent

Type: Object

Description: This property always returns the parent object in the object
hierarchy. In this case it is the Search Line Object
(SearchLine).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Set searchlines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).SearchLines
Dim searchline As Object
Set searchline = searchlines.Add
Dim obj As Object
Set obj = searchline.Reaches.Parent

80
Advanced Distance Automation Interface

Methods
Item (default property)

Syntax: object.Item(index)
Long index

Return type: Object (Reach)

Description: This method returns a Reach Object (Reach) from the


Reaches Collection. The parameter is the reach index in the
collection.

81
OMICRON Test Universe

Reach Object
Properties
IsStepUp

Syntax: object.IsStepUp

Type: Boolean

Description: This property returns True if step up.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim searchlines As Object
Set searchlines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).searchlines
searchlines.AddRX(0,0,90,2)
otm.Test
If searchlines.Reaches.Count > 0 Then
debug.Print searchlines.Reaches(1).IsStepUp
End If

RAct (read only)

Syntax: object.RAct

Type: Double

Description: This property returns the actual R.

82
Advanced Distance Automation Interface

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
Dim searchlines As Object
Set searchlines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).searchlines
searchlines.AddRX(0,0,90,2)
otm.Test
If searchlines.Reaches.Count > 0 Then
debug.Print searchlines.Reaches(1).RAct
debug.Print searchlines.Reaches(1).RDev
debug.Print
searchlines.Reaches(1).RDevPercent
debug.Print searchlines.Reaches(1).RNom
debug.Print searchlines.Reaches(1).Status
debug.Print
searchlines.Reaches(1).StatusString(“Status:
%s”)
debug.Print searchlines.Reaches(1).TLower
debug.Print searchlines.Reaches(1).TMax
debug.Print searchlines.Reaches(1).TMin
debug.Print searchlines.Reaches(1).TUpper
debug.Print searchlines.Reaches(1).Type
debug.Print searchlines.Reaches(1).XAct
debug.Print searchlines.Reaches(1).XDev
debug.Print
searchlines.Reaches(1).XDevPercent

83
OMICRON Test Universe

Example debug.Print searchlines.Reaches(1).XNom


(cont.):
debug.Print searchlines.Reaches(1).ZAct
debug.Print searchlines.Reaches(1).ZDev
debug.Print searchlines.Reaches(1).ZMax
debug.Print searchlines.Reaches(1).ZMin
debug.Print searchlines.Reaches(1).ZNom
debug.Print
searchlines.Reaches(1).ZoneLabelHigh
debug.Print
searchlines.Reaches(1).ZoneLabelLow
End If

RDev (read only)

Syntax: object.RDev

Type: Double

Description: This property returns the R deviation in Ohm.

Example: See RAct example.

RDevPercent (read only)

Syntax: object.RDevPercent

Type: Double

Description: This property returns the R deviation in %.

Example: See RAct example.

84
Advanced Distance Automation Interface

RNom (read only)

Syntax: object.RNom

Type: Double

Description: This property returns the nominal R.

Example: See RAct example.

Status (read only)

Syntax: object.Status

Type: Long

Description: This property returns the reach status.


Possible values are:
RSFailed
RSNotTested

See Constants object for complete list.

Example: See RAct example.

StatusString (read only)

Syntax: object.StatusString(format)

Type: String format

Description: This property returns the reach status string.


The format parameter is used to format the returned string.

Example: See RAct example.

85
OMICRON Test Universe

TLower (read only)

Syntax: object.Tlower

Type: Double

Description: This property returns the lower time in s.

Example: See RAct example.

86
Advanced Distance Automation Interface

TMax (read only)

Syntax: object.TMax

Type: Double

Description: This property returns the time max in s.

Example: See RAct example.

TMin (read only)

Syntax: object.TMin

Type: Double

Description: This property returns the time min in s.

Example: See RAct example.

TUpper (read only)

Syntax: object.TUpper

Type: Double

Description: This property returns the time upper in s.

Example: See RAct example.

Type (read only)

Syntax: object.TUpper

Type: Long

Description: This property returns the reach type.

Example: See RAct example.

87
OMICRON Test Universe

XAct (read only)

Syntax: object.XAct

Type: Double

Description: This property returns the actual X in Ohm.

Example: See RAct example.

XDev (read only)

Syntax: object.XDev

Type: Double

Description: This property returns the X deviation in Ohm.

Example: See RAct example.

DevPercent (read only)

Syntax: object.XDevPercent

Type: Double

Description: This property returns the X deviation in %.

Example: See RAct example.

XNom (read only)

Syntax: object.XNom

Type: Double

Description: This property returns the nominal X.

Example: See RAct example.

88
Advanced Distance Automation Interface

ZAct (read only)

Syntax: object.ZAct

Type: Double

Description: This property returns the actual Z in Ohm.

Example: See RAct example.

ZDev (read only)

Syntax: object.ZDev

Type: Double

Description: This property returns the Z deviation in Ohm.

Example: See RAct example.

ZMax (read only)

Syntax: object.ZMax

Type: Double

Description: This property returns the Z max in Ohm

Example: See RAct example.

ZMin (read only)

Syntax: object.ZMin

Type: Double

Description: This property returns the Z min in Ohm

Example: See RAct example.

89
OMICRON Test Universe

ZNom (read only)

Syntax: object.ZNom

Type: Double

Description: This property returns the nominal Z in Ohm.

Example: See RAct example.

ZoneLabelHigh (read only)

Syntax: object.ZoneLabelHigh

Type: String

Description: This property returns the zone label high.

Example: See RAct example.

ZoneLabelLow (read only)

Syntax: object.ZoneLabelLow

Type: String

Description: This property returns the zone label low.

Example: See RAct example.

90
Advanced Distance Automation Interface

CheckLines Collection Object


Properties
Application (read only)

Syntax: object.Application

Type: Object (Application)

Description: Returns the Application Object (Application)

Example: Dim otm As Object


Dim dist As Object
Set otm = Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
Dim app As Application
Set app =
dist.Document.FaultTypes(1).CheckLines.Application

Count (read only)

Syntax: object.Count

Type: Long

Description: This property returns the number of check lines.

Example: Dim otm As Object


Dim dist As Object
Set otm = Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
MsgBox "Number of shots in fault type L1N: " &
dist.Document.FaultTypes(1).CheckLines.Count

91
OMICRON Test Universe

Parent (read only)

Syntax: object.Parent

Type: Object

Description: This property always returns the parent object in the object
hierarchy. In this case it is the Fault Type Object (FaultType).

Example: Dim otm As Object


Dim dist As Object
Set otm = Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
Dim obj As Object
Set obj =
dist.Document.FaultTypes(1).CheckLines.Parent

92
Advanced Distance Automation Interface

Methods
Add

Syntax: object.Add

Return type: Object (CheckLine)

Description: This method adds a check line to the CheckLines collection


and returns the created check line Object (CheckLine).

AddRelRx

Syntax: object.AddRelRX(R, X, Angle, PercentZone, ZoneKey)


Double R
Double X
Double Angle
Double PercentZone
Long ZoneKey

Return type: Object (CheckLine)

Description: This method adds a relative check line to the CheckLines


collection and returns the created check line Object
(CheckLine).

93
OMICRON Test Universe

AddRelZPhi

Syntax: object.AddRelZPhi(Z, Phi, Angle, PercentZone, ZoneKey)


Double Z
Double Phi
Double Angle
Double PercentZone
Long ZoneKey

Return type: Object (CheckLine)

Description: This method adds a relative check line to the CheckLines


collection and returns the created check line Object
(CheckLine)

AddRx

Syntax: object.AddRX(R, X, Angle, Length)


Double R
Double X
Double Angle
Double Length

Return type: Object (CheckLine)

Description: This method adds an absolute check line to the CheckLines


collection and returns the created check line Object
(CheckLine)

94
Advanced Distance Automation Interface

AddZPhi

Syntax: object.AddZPhi(Z, Phi, Angle, Length)


Double Z
Double Phi
Double Angle
Double Length

Return type: Object (CheckLine)

Description: This method adds an absolute check line to the CheckLines


collection and returns the check check line Object
(CheckLine)

Remove

Syntax: object.Remove(index)
Long index

Return type: none

Description: This method removes the specified check line from the
CheckLines collection.

RemoveAll

Syntax: object.RemoveAll
Long index

Return type: none

Description: This method removes all the check lines from the
CheckLines collection.

95
OMICRON Test Universe

Item (default property)

Syntax: object.Item(index)
Long index

Return type: Object (CheckLine)

Description: This method returns a check line Object (CheckLine) from


the CheckLines Collection. The parameter is the check line
index in the collection.

96
Advanced Distance Automation Interface

CheckLine Object
Properties
Absolute

Syntax: object.Absolute

Type: Boolean

Description: This property specifies if the check line is absolute (True).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
Dim checklines As Object
Set checklines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).checklines
checklines.Add
checklines(1).Absolute = False

97
OMICRON Test Universe

Angle

Syntax: object.Angle

Type: Double

Description: This property specifies the check line angle. The unit is degree.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
Dim checklines As Object
Set checklines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).checklines
checklines.Add
checklines(1).Angle = 45.0

98
Advanced Distance Automation Interface

IsFailed (read only)

Syntax: object.IsFailed

Type: Boolean

Description: This property returns True if the check line test has failed.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
Dim checklines As Object
Set checklines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).checklines
checklines.Add
otm.Test
If checklines(1).IsFailed then MsgBox("Test
failed")

99
OMICRON Test Universe

Length

Syntax: object.Length

Type: Double

Description: This property specifies the check line length. The unit is Ohm

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
Dim checklines As Object
Set checklines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).checklines
checklines.Add
checklines(1).Length = 1.0

100
Advanced Distance Automation Interface

Phi

Syntax: object.Phi

Type: Double

Description: This property specifies the angle of the check line origine.
The unit is degree.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
Dim checklines As Object
Set checklines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).checklines
Dim checkline As Object
Set checkline = checklines.Add
checkline.Z = 1.0
checkline.Phi = 45.0

101
OMICRON Test Universe

Syntax: object.R

Type: Double

Description: This property specifies the R value of the check line origine.
The unit is Ohm.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
Dim checklines As Object
Set checklines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).checklines
Dim checkline As Object
Set checkline = checklines.Add
checkline.R = 1.0

102
Advanced Distance Automation Interface

Status (read only)

Syntax: object.Status

Type: Long

Description: This property returns the check line status.


Possible values are:
SSFailed
SSNotTested

See Constants object for complete list.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
Dim checklines As Object
Set checklines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).checklines
Dim checkline As Object
Set checkline = checklines.Add
If checkline.Status =
dist.Constants.SSNotTested Then
MsgBox("Not Tested")
End If

103
OMICRON Test Universe

Syntax: object.X

Type: Double

Description: This property specifies the X value of the check line origine.
The unit is Ohm.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
Dim checklines As Object
Set checklines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).checklines
Dim checkline As Object
Set checkline = checklines.Add
checkline.X = 1.0

104
Advanced Distance Automation Interface

Syntax: object.Z

Type: Double

Description: This property specifies the Z value of the check line origine.
The unit is Ohm.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
Dim checklines As Object
Set checklines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).checklines
Dim checkline As Object
Set checkline = checklines.Add
checkline.Z = 1.0

105
OMICRON Test Universe

ZoneKey

Syntax: object.ZoneKey

Type: Long

Description: This property specifies the zone-key, the zone index of a


relative check line.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
Dim checklines As Object
Set checklines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).checklines
Dim checkline As Object
Set checkline = checklines.Add
checkline.Absolute = False
checkline.ZoneKey = 2

106
Advanced Distance Automation Interface

ZoneType

Syntax: object.ZoneType

Type: Long

Description: This property specifies the zone-type, defined for a relative


check line. Possible values: ZTExtended, ZTNonTripping,
ZTStarting, ZTTripping (Defined in the Constants Object).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
Dim checklines As Object
Set checklines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).checklines
Dim checkline As Object
Set checkline = checklines.Add
checkline.Absolute = False
checkline.ZoneType =
dist.Constants.ZTStarting

107
OMICRON Test Universe

PercentZone

Syntax: object.PercentZone

Type: Double

Description: This property specifies the percent of the zone, defined for a
relative check line.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
Dim checklines As Object
Set checklines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).checklines
Dim checkline As Object
Set checkline = checklines.Add
checkline.Absolute = False
checkline.PercentZone = 40

108
Advanced Distance Automation Interface

ZoneLabel (read-only)

Syntax: object.ZoneLabel

Type: String

Description: This property returns the zone-label, defined for a relative


check line.

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
Dim checklines As Object
Set checklines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).checklines
Dim checkline As Object
Dim zone As String
Set checkline = checklines.Add
checkline.Absolute = False
zone = checkline.ZoneLabel

109
OMICRON Test Universe

LinkToLineAngle

Syntax: object.LinkToLineAngle

Type: Boolean

Description: This property specifies the link to line angle option (Follow
line angle change).

Example: Dim otm As Object


Dim dist As Object
Set otm =
Document.InsertObject("OMADist.Document")
Set dist = otm.Specific
Dim checklines As Object
Set checklines =
dist.Document.FaultTypes(dist.Constants.FTL1L
2).checklines
Dim checkline As Object
Set checkline = checklines.Add
checkline.LinkToLineAngle = True

110
Advanced Distance Automation Interface

Constants Object
Properties
The following is a list some useful IDs supported by the OMICRON Advanced
Distance Module.
Note: Do NOT use these IDs out of the Automation scope.
Fault Types
FTL1N
FTL2N
FTL3N
FTL1L2
FTL2L3
FTL3L1
FTL1L2L3

Fault Inception Mode


FIMFixed
FIMMaximum
FIMRandom
FIMZero

Reach Status
RSFailed
RSNotTested
RSOutOfRange
RSOverloadFailed
RSOverloadPassed
RSOverloadTrippedPrefault
RSPassed
RSTrippedPrefault

111
OMICRON Test Universe

Reach Type
RTIdentify
RTSearchZ
RTVerify

Shot Status
SSFailed
SSNotTested
SSOutOfRange
SSOverloadFailed
SSOverloadPassed
SSOverloadTrippedPrefault
SSPassed
SSTrippedPrefault

Shot Type
STAbsolute
STRelative

Test Mode
TMConstantCurrent
TMConstantVoltage
TMConstantSourceImp
Time Reference
TRFaultInception
TRStarting

112
Advanced Distance Automation Interface

Zone Type
ZTExtended
ZTNonTripping
ZTStarting
ZTTripping

113
OMICRON Test Universe

114

You might also like