COM object EvRegionsCollection
EvApplication > EvFileCollection > EvFile > EvRegionsCollection
View the COM map and the COM summary. |
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.
EvRegionsCollection methods and properties:
Count
Delete
DeleteAll
DeleteByClass
ExportDefinitions
ExportDefinitionsAll
FindByName
Import
Item
|
Description |
(read-only) integer Count SummaryGet the number of regions in the collection. |
|
boolean Delete(EvRegion RegionToDelete) SummaryDelete the Region object specified by the parameter RegionToDelete. The Region object is accessed through EvFile.Regions. ReturnTrue, if successful. ExampleDim 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 |
|
boolean DeleteAll SummaryDeletes all regions an EV file. ReturnTrue, if successful. Example'Open the EV file Dim EvApp: Set EvApp = GetObject(, "EchoviewCom.EvApplication") Dim EvFile: Set EvFile = EvApp.OpenFile("D:\PathTo\YourEVFile.EV") EvFile.Regions.DeleteAll |
|
boolean DeleteByClass(EvRegionClass Class) SummaryDelete the regions in a Region class specified by Class. The Class parameter is a EvRegionClass object accessed through EvFile.RegionClasses. ReturnTrue, if successful. ExampleOption 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) |
|
boolean ExportDefinitions(string FileName, EvRegionClass) SummaryExport the region definition of all regions (in the EV file) to the specified filename. Notes:
Parameters
ReturnTrue if successful. |
|
boolean ExportDefinitionsAll(string FileName) SummaryExport the region definition of all regions (in the EV file) to the specified filename. This method is suited to MATLAB scripts (that do not accept an empty parameter that may occur with the method ExportDefinitions). Notes:
Parameters
ReturnTrue if successful. |
|
FindByName(string RegionName) SummaryFind the Region object specified by RegionName in the RegionsCollection. Note: When two regions have the same name, the first one found is used. ReturnNull if RegionName can not be found. |
|
boolean Import(string FileName) SummaryImport the 2D regions from the specified 2D region definition .evr file. ReturnTrue, if successful. |
|
(read-only) Item[] SummaryGives 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 EvFileCollection page show several ways to use the Item property. |
See also
Scripting with COM objects
COM object hierarchy
EvRegion object
EvRegionClass object
EvRegionClassesCollection