COM object EvVariableBase

EvApplication > EvFile > EvVariablesCollection > EvVariableBase

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

The EvVariableBase object gives access to information on and actions for a variable in an EV file.

You can use the EvVariableBase object to determine if the variable is an acoustic variable or a virtual variable. With this knowledge you can proceed to use the methods and properties of the EvVariableAcoustic object or the EvVariableVirtual object.

The EvFile.Variables[] property lists all of the variables in an EV file and is an EvVariablesCollection.

The following EvVariable base methods and properties are detailed below:

Methods

Properties

AsVariableBase
AsVariableAcoustic
AsVariableVirtual
ExportData
ExportTrackToImage

FullName
Name
Useable
ShortName
VariableType

EvVariableBase implements the following methods and properties:

EvVariableBase methods

Description

AsVariableBase

AsVariableBase()

Summary

Determines if the variable is a base variable. All variables come under the base variable grouping so this method will always return EvVariableBase.

Parameters

None.

Return

EvVariableBase.

AsVariableAcoustic

AsVariableAcoustic()

Summary

Determines if the variable is an acoustic variable.

Parameters

None.

Return
  • EvVariableAcoustic when the variable is an acoustic variable.
  • Null when the variable is not an acoustic variable.
AsVariableVirtual

AsVariableVirtual()

Summary

Determines if the variable is a virtual variable.

Parameters

None.

Return
  • EvVariableVirtual when the variable is a virtual variable.
  • Null when the variable is not a virtual variable.

ExportData

ExportData(string FileName, int FirstPing, int LastPing)

Summary

Export the data for the current variable. ExportData includes support for acoustic, position, attitude and distance variables.

Parameters
  • FileName
  • The name of file and path to export data to.
  • FirstPing
  • The ping to begin data export.
  • LastPing
  • The ping to end the data export.
Return

If successful.

Notes:

  • Exports to a nominated filename with a default .csv extension (if no extension is specified). Other file extensions such as .mat (Matlab) can be specified.
  • To export a whole echogram when the start and stop ping numbers are unknown, use -1 for the FirstPing and LastPing. For example:
    EvVar.ExportData "c:\Myriax\Echoview\Echoview4\Test.mat", -1,-1"
    

ExportTrackToImage

ExportTrackToImage(string FileName, int WidthInPixels, int HeightInPixels)

Summary

Export the Cruise track or Along track cruise track window as an image.

Note: You can also export an image of a selection from an acoustic variable.

Parameters
  • FileName
  • The name of file to export data to. The file extension specifies the type of image. Available extensions are: *.bmp, *.jpg, *.jpeg, *.png, *.tif, *.tiff.
  • WidthInPixels
  • Width of the window in pixels.
  • HeightInPixels
  • Height of the window in pixels.
Return

If successful.

Example

Export an image of a cruise track or an echogram.

 

EvVariableBase properties

Description

FullName

(read-only) string FullName

Summary

Gets the full name of a variable, disregarding any short name.

Name

(read-only) string Name

Summary

Gets the name of a variable, or the short name if set.

ShortName

(read-write) string ShortName

Summary

Gets and sets the short name of a variable.

Useable

(read-only) boolean Useable

Summary

Returns an indication as to whether the variable can be used or not.

  • True if useable.
  • False if not useable.

VariableType

(read-only) VariableType

Summary

Returns an enum representing the type of variable that is represented by this object.

See also

Scripting with COM objects
EvVariableAcoustic
EvVariableVirtual
EvVariablesCollection