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 |
(read-only) integer Count SummaryGet the number of lines in the collection. |
|
CreateFixedDepth(double Depth) SummaryCreate an editable line with a fixed depth. This line is an EvLineEditable object. Parameters
ReturnEvLineEditable for the line. ExampleExamples 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(EvVariableAcoustic Var, boolean SpanGaps) SummaryCreate an editable line using a line pick on the specified acoustic variable. Parameters
ReturnEvLineEditable for the line. ExampleSee Lines example. |
|
CreateOffsetLinear(EvLine SourceLine, double Multiply, double Add, SummaryCreate a line using the Offset from line, Offset line and Offset (Linear function) Parameters
Note: Multiply, Add and SpanGaps are optional. ReturnEvLineEditable for the line. ExampleSee Lines example. |
|
CreateOffsetOffAxisAngle(EvLine SourceLine, double AngleDeg, string Transducer, boolean SpanGaps) SummaryCreate an editable line using the Offset from line, Offset line and Parameters
ReturnEvLineEditable for the line. ExampleSee Lines example. |
|
boolean Delete(EvLine Line) SummaryDelete the specified line. Parameters
ReturnIf successful the specified line has been deleted. Otherwise a message is written to the Scripting log file. ExampleSee Lines example. |
|
(read) FindByDynamicName(string DynamicName) SummaryFind the EvLine object specified by DynamicName in the LinesCollection. Parameters
ReturnThe return is an EvLine object. Null if DynamicName can not be found. Note: When a line does not have data, FindByDynamicName fails. ExampleThe following code snippet should return the first line object with a dynamic name that equals "Fixed depth [{Depth} m]".
|
|
(read) FindByName(string LineName) SummaryFind the EvLine object specified by LineName in the LinesCollection. ReturnNull if LineName can not be found. Note: When a line does not have data, FindByName fails. |
|
(read-only) Item[] SummaryGives 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