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

Variables

EvFile classes:

Properties

EvFile methods and properties:

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

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 though using the Import item in the File menu. 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.

Variables

(read-only) Variables[]

Summary

Collection of variables in the file.

See also

Scripting with COM objects
EvFileCollection
COM object hierarchy