COM object EvFile

EvApplication > EvFileCollection > EvFile

View the COM map and the COM summary.

The EvFile object accesses information about and performs actions on an EV file.

The EvApplication.EvFiles[] property lists all the EV files that are open in Echoview and is an EvFileCollection.

EvFile collections:

Filesets
Lines
Objects3D
Platforms
Regions
RegionClasses

Scenes
Transducers

TransectGroups
Variables

EvFile classes:

Properties

EvFile methods and properties:

Close
ExportEVDAll
ExportToIcesNetcdfAll
FileName
Import
IsLiveViewing

PreReadDataFiles
Save
SaveAs

Description

Close

boolean Close()

Summary

Close the EvFile.

Parameters

None.

Return

The status of the operation; true for success, false for failure.

See also: EvApp.CloseFile.

ExportEVDAll

boolean ExportEVDAll(string FileName, [EEvdExportCompression CompressionLevel], [double MaxFileSizeMB] )

Summary

Export all variable data to an Echoview Data File Format file, including raw/virtual variables and lines.

Note: Unavailable variables are not exported. Variables with no measurements, such as 'Ping subset 1' will not be included in the export, but will generate a message.

Parameters
  • FileName
  • Path and file name for the Echoview Data format file.
  • CompressionLevel (optional)
  • The EEvdExportCompression enum values correspond to the Compression (refer to Export options).
  • The default is eCompressionHighest.
  • MaxFileSizeMB
  • This optional parameter specifies the Target file size (MB) (refer to Export options).
  • The default value is -1 and exports a single file.
Return

True, if successful.

False, if unsuccessful (this can occur when you use the Cancel export button in Echoview during an export).

Example,
Dim vEchoviewCom: Set vEchoviewCom = GetObject(, "EchoviewCom.EvApplication")

                Dim vEvFile: Set vEvFile = vEchoviewCom.OpenFile("YourEvFile")
                vEvFile.ExportEVDAll "D:\Exports\EvdExportAll.evd"

See also: Enum issue under VBS.

ExportToIcesNetcdfAll

boolean ExportToIcesNetcdfAll( string FileName)

Summary

ExportToIcesNetcdfAll exports all Furuno FSV-30 (Research version) *.fsv raw Sv variable data in an EV file to a single *.nc file.

Parameters
  • Filename
  • The output file name and path.
Return

True when the export is successful. False when the export fails.

Example
Dim vEvFile: Set vEvFile = vEchoviewCom.OpenFile("YourEVFileAndPath.EV")
                vEvFile.ExportToIcesNetcdfAll "YourOutputPath\FileName.nc"

FileName

(read-only) string FileName

Summary

Gets the name of the EV file.

Parameters

None.

Return

The file name as a string.

Filesets

(read-only) Filesets[]

Summary

Enables access to the collection of filesets in the file.

Parameters

None.

Return

An EvFilesetCollection action for EvFileset.

Example
EvApplication.EvFiles.Item(0).Filesets.Item(0)'The EvFileset for the first EV fileset for the first EV file.
            

Import

boolean Import(string sFileName)

Summary

Import the specified file as per Importing 2D regions, while keeping existing regions. If the file cannot be imported, a message is sent to the scripting log file.

See Importing in Echoview for information on the supported file formats for lines, regions, 3D objects etc.

Parameters
  • FileName
  • The path and name of the file to attempt to load.
Return

True when the import is successful. False when the import fails.

Example
    Dim EvApp: Set EvApp = CreateObject("EchoviewCom.EvApplication")
              Dim EvFile: Set EvFile = EvApp.OpenFile("c:\Test files\svgain.EV")
              If EvFile Is Nothing Then
              MsgBox "Failed to open EV file"
              Else
              EvFile.Import("c:\Test files\Copy of Line1.evl")
              End If

          

IsLiveViewing

boolean IsLiveViewing(string sEVFileName)

Summary

Checks whether the specified EV file is being used for live viewing.

Parameters
  • sEVFileName
  • The name of the EV file being used for live viewing.
Return

True if the EV file is being used for live viewing, false otherwise.

Example
Dim EvApp: Set EvApp = CreateObject("EchoviewCom.EvApplication")
                For FileIndex = 0 To EvApp.EvFiles.Count-1
                Dim EvFile: Set EvFile = EvApp.EvFiles(FileIndex)
                If EvFile.IsLiveViewing Then
                MsgBox "File " + EvFile.FileName + " is live viewing."
                Else
                MsgBox "File " + EvFile.FileName + " is not live viewing."
                End If
                Next

            

Lines

(read-only) Lines[]

Summary

Collection of lines in the file.

Objects3D

(read-only) Objects3D[]

Summary

Collection of 3D objects in the file.

Platforms

(read-only) Platforms[]

Summary

Collection of Platform objects in the file.

PreReadDataFiles

PreReadDataFiles

Summary

Pre-reads an EV file. This is equivalent to using the Echogram keyboard shortcut P.

Parameters

The EV file can be specified by an EvApplication method or similar.

Example
Dim EvApp: Set EvApp = CreateObject("EchoviewCom.EvApplication")
                Dim EvFile: Set EvFile = EvApp.OpenFile("C:\Test files\prereadtest.ev")
                If EvFile Is Nothing Then
                MsgBox "Failed to open EV file"
                Else
                EvFile.PreReadDataFiles
                End if

            

Properties

(read-only) Properties

Summary

The EV file properties in the file, accessed through the EvFileProperties object.

Supported EV file properties include selected settings on the:

  • Echogram page
  • Schools page
  • Export page
  • EV file page (Data file locations)
  • Single beam (Line pick algorithms) on the Lines and Surfaces page
  • Fish tracks page (Fish track properties)
  • Classes page (Species properties)

Regions

(read-only) Regions[]

Summary

Collection of regions in the file.

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

RegionClasses

(read-only) RegionClasses[]

Summary

Collection of regions classes in the file.

Scenes

(read-only) Scenes[]

Summary

Collection of scenes in the file.

Save

boolean Save()

Summary

Save any changes made to the EvFile.

Parameters

None.

Return

The status of the operation; true for success, false for failure. The save is attempted regardless of whether or not the EV file is changed. This will always fail if the EV file has just been created.

SaveAs

boolean SaveAs(string sFileName)

Summary

Save the EvFile to a new location.

Parameters
  • sFileName
  • The path and name of the file to save to.
Return

The status of the operation; true for success, false for failure.

Transducers

(read-only) Transducers[]

Summary

Collection of Transducers in the file.

See also EvTransducer snippet.

TransectGroups

(read-only) TransectGroups[]

Summary

Collection of TransectGroups in the file.

See also EvTransectGroup snippet.

Variables

(read-only) Variables[]

Summary

Collection of variables in the file.

See also

Scripting with COM objects
EvFileCollection
COM object hierarchy