COM object EvRegion

EvApplication > EvFile > EvRegion

View the Echoview COM object hierarchy and the Echoview summary of COM objects.

The EvRegion object gives you access to information about and the ability to modify an Echoview 2D region or 3D region.

The EvFile.Regions[] property lists all the regions in an EV file and is an EvRegionsCollection.

The following EvRegion methods and properties are detailed below:

Methods

Properties

ExportDefinition
Classify
ShiftDepth
ShiftTime

Name
RegionType
Notes
StartTime
EndTime
RegionClass
Kind

 

EvRegion implements the following methods and properties:

EvRegion methods

Description

ExportDefinition

boolean ExportDefinition(string FileName)

Summary

Export the definition of this region to the given filename.

Note: See also EvFile.Regions.ExportDefinitions.

Parameters
  • FileName
  • The path and name of the file to save the exported region definition to.
Return

True if successful.

Classify

boolean Classify(EvVariableAcoustic Variable)

Summary

Apply a classification-by-rule to a specified region in an acoustic variable.

Notes:

Parameters
  • Variable
  • The name of the acoustic variable that contains the region to classify.
Return

True when a region class has been changed.

Example
option explicit
MsgBox "Echoview COM Classify a Region"
Dim EvApp
Set EvApp = CreateObject("EchoviewCom.EvApplication")
Dim EvFile
Set EvFile = EvApp.EvFiles.Item(0)
Dim Var: Set Var = EvFile.Variables.FindByName("Sv pings").AsVariableAcoustic()
If Var Is Nothing Then
     MsgBox "Failed to find variable"
Else
    'Classify Region10
    If Not EvFile.Regions.FindByName("Region10").Classify(Var) Then
       MsgBox "Failed to Classify Region10"
    End If 

ShiftDepth

boolean ShiftDepth(double Factor, double Offset)

Summary

Shift the depth of the region using the settings in the Region manager.

Parameters
  • Factor
  • The value for setting Multiply depths by.
  • Offset
  • The value for the setting then add (m).
Return

True when region depth is shifted.

Example
Dim EvApp: Set EvApp = CreateObject("EchoviewCom.EvApplication")
For FileIndex = 0 To EvApp.EvFiles.Count-1
        Dim EvFile: Set EvFile = EvApp.EvFiles(FileIndex)
        For RegionIndex = 0 To EvFile.Regions.Count-1
                Dim Region: Set Region = EvFile.Regions(RegionIndex)
                If Not Region.ShiftDepth(1.1, 10) Then
                    MsgBox "Failed to ShiftDepth"
                End If
                If Not Region.ShiftTime(0, 0, 1, 0, 0) Then
                    MsgBox "Failed to ShiftTime"
                End If
        Next
Next

ShiftTime

boolean ShiftTime(integer Days, integer Hours, integer Minutes, integer Seconds, integer MilliSeconds)

Summary

Shift the time of the region using the settings in the Region manager.

Parameters
  • Days
  • The (Add or Subtract) value for the setting days.
  • Hours
  • The (Add or Subtract) value for the setting hours.
  • Minutes
  • The (Add or Subtract) value for the setting minutes.
  • Seconds
  • The (Add or Subtract) value for the setting seconds.
Return

True when region time is shifted.

Example

Refer to ShiftDepth (above).

 

EvRegion properties

Description

Name

(read-write) string Name

Summary

Get or set the name of the region.

Note: When two regions have the same name, the first one found is used.

RegionType

(read-write) ERegionType RegionType

Summary

Get or set the type of the region by using an enum for ERegionType.

Note: eFishTrack = 3 is available as read-only.

Notes

(read-write) string Notes

Summary

Get or set the region notes.

StartTime

(read-only) DATE1 StartTime

Summary

Get the start time of the region.

EndTime

(read-only) DATE1 EndTime

Summary

Get the end time of the region.

RegionClass

(read-write) EvRegionClass RegionClass

Summary

Get the EvRegionClass object associated with the region.

Kind

(read-only) ERegionKind Kind

Summary

Find out which kind of region this is (a 2D region or 3D region). The output is an enum for ERegionKind.

1Microsoft Office DATE or Microsoft Visual Studio 2005/.NET Framework 2.0 DATE

See also

Scripting with COM objects
EvRegionsCollection
EvRegionClass object
EvRegionClassesCollection