COM object EvLinesCollection

EvApplication > EvFileCollection > EvFile > EvLinesCollection

 

View the COM map and the COM summary.

The EvLinesCollection object, accessed by EvFile.Lines[], gives you information about the number of lines or a line in an EV file, and allows you to create editable lines.

The EvLine object gives you the ability to access or change line names and the ability to export lines from an EV file.

EvLinesCollection methods and properties:

Count
CreateFixedDepth
CreateLinePick
CreateOffsetLinear
CreateOffsetOffAxisAngle
Delete
FindByDynamicName
FindByName

Item

 

Description

Count

(read-only) integer Count

Summary

Get the number of lines in the collection.

CreateFixedDepth

CreateFixedDepth(double Depth)

Summary

Create an editable line with a fixed depth. This line is an EvLineEditable object.

Parameters
  • Depth
  • Value for the Depth on the Source page of the Line Properties dialog box.
Return

EvLineEditable for the line.

Example

Examples of how EvLine, EvLinePickProperties and EvLinesCollection methods and properties can be used. A comment mark is used to take scripting lines out of the active script. The code snippet is part of a Windows script file (.wsf) and uses the enum name for the Algorithm property.

See also: Enum issue under VBS.

      Dim EvApp: Set EvApp = CreateObject("EchoviewCom.EvApplication")
      If EvApp.EvFiles.Count = 0 Then
        MsgBox "Please open an EV file and run this script again."
        WScript.Quit
      End If
      Dim EvFile: Set EvFile = EvApp.EvFiles(0)
        Dim EvLine: Set EvLine = EvFile.Lines.FindByName("Line1")
        Dim EvLineEdit: Set EvLineEdit = EvLine.AsLineEditable
        If EvLineEdit Is Nothing Then
          MsgBox "Error, not editable " & EvLine.Name
        Else
          'MsgBox "The line " & EvLine.Name & " is not virtual."
          Dim EvLineSource: Set EvLineSource = EvFile.Lines.FindByName("Fixed depth 1")
          'EvLineEdit.OverwriteWith(EvLineSource)
          'Dim EvNewLine: Set EvNewLine = EvFile.Lines.CreateOffsetLinear(EvLineSource, 1.1, 25, True)
          'Dim EvNewLine: Set EvNewLine = EvFile.Lines.CreateOffsetOffAxisAngle(EvLineSource, 5.1, "Transducer1", True)
          'Dim EvNewLine: Set EvNewLine = EvFile.Lines.CreateFixedDepth(23)
          'Set up a Line pick algorithm Best bottom candidate: Start depth 10, Stop depth 100, Minimum Sv for good pick -70,
          '  Use Backstep, Discrimination level -50.0, Back step range -0.50. Peak threshold -50.0,
          '  Maximum dropouts 2, Window radius 8, Minimum peak asymmetry -1.0
                  EvFile.Properties.LinePick.Algorithm = 2
                  EvFile.Properties.LinePick.StartDepth = 10
                  EvFile.Properties.LinePick.StopDepth = 100
                  EvFile.Properties.LinePick.MinSv = -70
                  EvFile.Properties.LinePick.UseBackstep = True
                  EvFile.Properties.LinePick.DiscriminationLevel = -50.0
                  EvFile.Properties.LinePick.BackstepRange = -0.50
                  EvFile.Properties.LinePick.PeakThreshold = -50.0
                  EvFile.Properties.LinePick.MaxDropouts = 2
                  EvFile.Properties.LinePick.WindowRadius = 8
                  EvFile.Properties.LinePick.MinPeakAsymmetry = -1.0
          Dim EvNewLine: Set EvNewLine = EvFile.Lines.CreateLinePick(EvFile.Variables.FindByName("Sv raw pings T1"), True)
          MsgBox EvNewLine.Name
        End If

CreateLinePick

CreateLinePick(EvVariableAcoustic Var, boolean SpanGaps)

Summary

Create an editable line using a line pick on the specified acoustic variable.

Parameters
  • Var
  • The (acoustic) Variable (specified by EvVariableAcoustic) on the Source page of the Line Properties dialog box.
  • SpanGaps
  • The setting for Span Gaps on the Source page of the Line Properties dialog box. SpanGaps is optional, its default value is false.
Return

EvLineEditable for the line.

Example

See Lines example.

CreateOffsetLinear

CreateOffsetLinear(EvLine SourceLine, double Multiply, double Add,
boolean SpanGaps)

Summary

Create a line using the Offset from line, Offset line and Offset (Linear function)
settings on the Source page of the Line Properties dialog box.

Parameters
  • SourceLine
  • The line (as specified by Evline) selected for the Offset line setting.
  • Multiply
  • The value for Multiply each depth from the Offset line for the
    Offset (Linear function) setting.
  • Add
  • The value for Add or subtract a fixed depth from the Offset Line for the
    Offset (Linear function) setting.
  • SpanGaps
  • The setting for Span Gaps on the Source page of the Line Properties dialog box.

Note: Multiply, Add and SpanGaps are optional.

Return

EvLineEditable for the line.

Example

See Lines example.

CreateOffsetOffAxisAngle

CreateOffsetOffAxisAngle(EvLine SourceLine, double AngleDeg, string Transducer, boolean SpanGaps)

Summary

Create an editable line using the Offset from line, Offset line and
Offset (Off-axis angle) settings on the Source page of the Line Properties dialog box.

Parameters
  • SourceLine
  • The line (as specified by Evline) selected for the Offset line setting.
  • AngleDeg
  • The value for Angle (degrees) for the Offset (Off-set angle) setting.
  • Transducer
  • The name of the Transducer for the Offset (Off-set angle) setting.
  • SpanGaps
  • The setting for Span Gaps on the Source page of the Line Properties dialog box. SpanGaps is optional, its default value is false.
Return

EvLineEditable for the line.

Example

See Lines example.

Delete

boolean Delete(EvLine Line)

Summary

Delete the specified line.

Parameters
  • Line
  • The line to delete as specified by EvLine.
Return

If successful the specified line has been deleted.

Otherwise a message is written to the Scripting log file.

Example

See Lines example.

FindByDynamicName

(read) FindByDynamicName(string DynamicName)

Summary

Find the EvLine object specified by DynamicName in the LinesCollection.

Parameters
  • DynamicName
  • String for the line's dynamic name.
Return

The return is an EvLine object. Null if DynamicName can not be found.

Note: When a line does not have data, FindByDynamicName fails.

Example

The following code snippet should return the first line object with a dynamic name that equals "Fixed depth [{Depth} m]".

Dim vObj: Set vObj = vEvFile.Lines.FindByDynamicName("Fixed depth [{Depth} m]")

FindByName

(read) FindByName(string LineName)

Summary

Find the EvLine object specified by LineName in the LinesCollection.

Return

Null if LineName can not be found.

Note: When a line does not have data, FindByName fails.

Item

(read-only) Item[]

Summary

Gives access to a specific line in the EvLinesCollection by index. Indexes are zero-based, so valid indexes are from 0 to Count-1. The result is an EvLine object.

Item is the default property for this interface. The examples on the EvFileCollection page show several ways to use the Item property.

See also

Scripting with COM objects
COM object hierarchy
EvLine object
EvFileProperties object
EvLineEditable object
EvLinePickProperties object