COM object EvRegion
EvApplication>EvFileCollection > EvFile > EvRegionsCollection > EvRegion
View the COM map and the COM summary. |
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.
EvRegion classes:
EvRegion methods and properties:
Classify
EndTime
ExportDefinition
Id
Kind
Name
Notes
RegionType
ShiftDepth
ShiftTime
StartTime
|
Description |
boolean Classify(EvVariableAcoustic Variable) SummaryApply a classification-by-rule to a specified region in an acoustic variable. Notes:
Parameters
ReturnTrue when a region class has been changed. Exampleoption 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 |
|
(read-only) DATE1 EndTime SummaryGet the end time of the region. |
|
boolean ExportDefinition(string FileName) SummaryExport the definition of this region to the given filename. Note: See also EvFile.Regions.ExportDefinitions. Parameters
ReturnTrue if successful. |
|
(read-only) Id SummaryGet a region's unique ID number. The region ID number is visible on the Regions window and may be specified with region exports. An EvRegion.Name or region from EvRegionsCollection is required to access the region ID. EvRegion.Id has advantages over EvRegion.Name (regions can have the same name) or an index in EvRegionCollections (regions can be deleted and the index may change). ExampleDim vEchoviewCom: Set vEchoviewCom = GetObject(, "EchoviewCom.EvApplication") Dim vEvFile: Set vEvFile = vEchoviewCom.EvFiles.Item(0) Dim vEvRegionsCollection: Set vEvRegionsCollection = vEvFile.Regions Dim iRegion For iRegion = 0 To vEvRegionsCollection.Count - 1 MsgBox "Region ID: " + CStr(vEvRegionsCollection(iRegion).Id) Next Dim vEvRegion: Set vEvRegion = vEvRegionsCollection.FindByName("Region2") MsgBox "Region ID from name: " + CStr(vEvRegion.Id) |
|
(read-only) ERegionKind Kind SummaryFind out which kind of region this is (a 2D region or 3D region). The output is an enum for ERegionKind. See also: Enum issue under VBS. |
|
(read-write) string Name SummaryGet or set the name of the region. Note: When multiple regions have the same name, the first one found is used. |
|
(read-write) string Notes SummaryGet or set the region notes. |
|
(read-write) EvRegionClass RegionClass SummaryGet the EvRegionClass object associated with the region. |
|
(read-write) ERegionType RegionType SummaryGet or set the type of the region by using an enum for ERegionType. Note: eFishTrack = 3 is available as read-only. See also: Enum issue under VBS. |
|
boolean ShiftDepth(double Factor, double Offset) SummaryShift the depth of the region using the settings in the Region Editor. Parameters
ReturnTrue when region depth is shifted. ExampleDim 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 |
|
boolean ShiftTime(integer Days, integer Hours, integer Minutes, integer Seconds, integer MilliSeconds) SummaryShift the time of the region using the settings in the Region Editor. Parameters
ReturnTrue when region time is shifted. ExampleRefer to ShiftDepth (above). |
|
(read-only) DATE1 StartTime SummaryGet the start time of the region. |
See also
Scripting with COM objects
COM object hierarchy
EvRegionsCollection
EvRegionClass object
EvRegionClassesCollection