COM object EvDataFilesCollection

EvApplication > EvFileCollection > EvFile > EvFilesetsCollection > EvFileset > EvDataFilesCollection

 

View the COM map and the COM summary.

The EvDataFilesCollection object gives you access to information about and the ability to add and remove data files in an EV file. A data file is an item in the EvDataFilesCollection.

The EvDataFile object gives access to specific information from a data file.

EvDataFilesCollection methods and properties:

Add
Count
Item

FindByFileName
Remove
RemoveAll

 

Description

Add

Add(String FileName)

Summary

Add a data file to the collection.

Note: Echoview pauses until the Add data file process is complete.

Parameters

String sFileName - The path and name of the file to add.

Return

None.

Count

(read-only) Integer Count()

Summary

Get the number of data files currently in the collection.

Parameters

None.

Return

Integer - Returns the number of data files in the collection.

FindByFileName

EvDataFile FindByFileName(String sDataFile)

Summary

Find the data file from the collection.

Parameters

String sDataFile - The name of the data file you wish to find in the collection

Return

EvDataFile object - The EVDataFile object whose name matches the sDataFile string.

Item

(read-only) EvDataFile Item(Integer iIndex)

Summary

Gives access to a specific EvDataFile object in the EvDataFilesCollection by index.

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

Parameters

Integer iIndex - Indexes are zero-based, so valid indexes are from 0 to Count-1.

Return

EvDataFile object

Remove

Boolean Remove(EvDataFile oDataFile)

Summary

Remove the given data file from the collection. Note: If you want to remove all data files use the method RemoveAll.

Parameters

EvDataFile oDataFile - The COM object referring to the data file to be removed from the collection.

Return

Boolean - True if removal is successful.

RemoveAll Boolean RemoveAll()
Summary

Remove all data files from the collection.

Parameters

None.

Return

Boolean - True if removal is successful.

Example
Dim vEchoviewCom: Set vEchoviewCom = GetObject(, "EchoviewCom.EvApplication")
Dim vEvFile: Set vEvFile = vEchoviewCom.EvFiles.Item(0)
Dim Fileset: Set Fileset = vEvFile.Filesets.FindByName("Fileset1")
Fileset.DataFiles.RemoveAll

See also

Scripting with COM objects
EvDataFile object
COM object hierarchy