|
EvApplication > EvFile > EvFilesCollection View the Echoview COM object hierarchy and the Echoview summary of COM objects. |
The EvFilesCollection object governs access to a set of EV files.
To access the EV files:
use the EvApplication.EvFiles[] property.
The EvFile object accesses information about and performs actions on an EV file.
The following EvFilesCollection methods and properties are detailed below:
|
FindByName |
Count |
EvFilesCollection implements the following methods and properties:
|
Description |
|
|
FindByFileName |
FindByFileName(string Name) SummarySearches for an open EV file by its filename, and if found returns the EvFile object for it. Parameters
|
|
Description |
|
|
Count |
(read-only) integer Count SummaryGet the number of EV files in this collection. That is, the number of EV files the application has open. |
|
Item |
(read-only) Item[] SummaryGives access to a specific EV file by index. Indexes are zero-based, so valid indexes are from 0 to Count-1. The result is an EvFile object. Item is the default property for this interface. See the example usage below for how to use this property. |
EvFilesCollection is very useful for iterating through all open EV files. For example, the following script shows the file name of each open EV file in a series of message boxes:
Dim EvApp
Set EvApp = CreateObject("EchoviewCom.EvApplication")
Dim FIndex
For FIndex = 0 to EvApp.EvFiles.Count-1
MsgBox EvApp.EvFiles.Item(FIndex).FileName
Next
Because Item is the default property for this interface, in many languages you can omit the Item specifier when accessing by index:
For FIndex = 0 to EvApp.EvFiles.Count-1
MsgBox EvApp.EvFiles(FIndex).FileName
Next
You can search for an EV file that has already been opened if you know its filename. This example also shows testing for an invalid object, to handle the situation where the EV file was not open in Echoview and as a result the FindByFileName method could not return it.
Dim MyFile
Set MyFile = EvApp.EvFiles.FindByFileName("c:\Example.EV")
' If this file was found, print the filename of the resulting object
If Not MyFile Is Nothing Then
MsgBox MyFile.FileName
Else
MsgBox "The EV file was not found."
End If