COM object EvRegionsCollection

EvApplication > EvFile > EvRegionsCollection

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

The EvRegionsCollection object gives you access to information about the set of regions defined, and the ability to import region definitions into an EV file. A region is an item in the EvRegionsCollection, which is accessed via the EvFile.Regions[] property.

The EvRegion object allows you to find specific information or modify specific information about a region in the EvRegionsCollection.

The following EvRegionsCollection methods and properties are detailed below:

Methods

Properties

ExportDefinitions
Delete
DeleteByClass
FindByName

Count
Item

EvRegionsCollection implements the following methods and properties:

EvRegionsCollection methods

Description

FindByName

FindByName(string RegionName)

Summary

Find the Region object specified by RegionName in the RegionsCollection.

Note: When two regions have the same name, the first one found is used.

Return

Null if RegionName can not be found.

ExportDefinitions

boolean ExportDefinitions(string FileName)

Summary

Export the region definition of all regions (in the EV file) to the specified filename.

Notes:

Parameters
  • FileName
  • The path and name of the file to save the exported region definitions to.
Return

True if successful.

Delete

boolean Delete(EvRegion RegionToDelete)

Summary

Delete the Region object specified by the parameter RegionToDelete. The Region object is accessed through EvFile.Regions.

Return

If successful.

Example
Dim EvApp: Set EvApp = CreateObject("EchoviewCom.EvApplication")
Dim EvFile: Set EvFile = EvApp.OpenFile("c:\Test files\regiondelete.EV")
If EvFile Is Nothing Then
        MsgBox "Failed to open EV file"
Else
        Dim R: Set R = EvFile.Regions.FindByName("Region1")
        If R Is Nothing Then
                 MsgBox "Failed to find region"
        Else
        
                If Not EvFile.Regions.Delete(R) Then
                        MsgBox "Failed to delete regions"
                End If 
        End If
End If

DeleteByClass

boolean DeleteByClass(EvRegionClass Class)

Summary

Delete the regions in a Region class specified by Class. The Class parameter is a EvRegionClass object accessed through EvFile.RegionClasses.

Return

If successful.

Example
      Option Explicit
        Dim EvApp: Set EvApp = CreateObject("EchoviewCom.EvApplication")
        
        Dim EvFile
        Set EvFile = EvApp.EvFiles.Item(0)
        Dim RC
        Set RC = EvFile.RegionClasses.FindByName("Class1")
        
        EvFile.Regions.DeleteByClass(RC)

 

EvRegionsCollection properties

Description

Count

(read-only) integer Count

Summary

Get the number of regions in the collection.

Item

(read-only) Item[]

Summary

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

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

See also

Scripting with COM objects
EvRegion object
EvRegionClass object
EvRegionClassesCollection