COM object EvApplication
The EvApplication object represents the Echoview program. It contains methods and properties to access information about the running instance of Echoview and the EV files that are open.
View the COM map and the COM summary.
Use EvApplication to access Echoview via COM. All Echoview’s COM automation functionality is begun through this object. Refer to Scripting with COM objects - Creating a script.
EvApplication collections:
EvApplication methods and properties:
BringToFront
CloseFile
Exec
ExportOperatorDataTypeList
ExportPropertyInformation
GetLastLogMessage
IsLicensed
LiveViewingDataLogger
Log
LogFileName
Minimize
NewFile
OpenFile
Quit
Restore
StartLiveViewing
StopLiveViewing
Version
Collections |
Description |
(read-only) DataLoggers[] SummaryView the data loggers available for live viewing. DataLoggers refers to EvDataLoggersCollection. ExampleRefer to Data logger snippet. |
|
(read-only) EvFiles[] SummaryRead-only EvFileCollection object containing a reference to an EV file for each open document. This is used for iterating through all open EV files or for searching for an open EV file by file name. |
Methods and Properties |
Description |
BringToFront() SummaryAttempts to bring the Echoview window to the front of the user's workspace; this will restore the window if it has been minimized. However it may not actually bring the window to the front, and just flash the Echoview Taskbar button (this is a feature of Windows, to prevent an active application from changing without user intervention). |
|
CloseFile(EvFile oFileName) SummaryCloses an open EV file. Closes the file connected to the EvFile object. Parameters
ReturnNone.
See also: EvFile.Close. |
|
string Exec(string CommandLineText) SummaryThis method accepts, issues and executes your command interface instructions. Parameters
ExampleThis snippet displays the distance between grid lines, changes the distance and outputs the new grid distance. Dim evApp: Set evApp = GetObject(, "EchoviewCom.EvApplication") ReturnA string. Refer to the console output for some examples. |
|
boolean ExportOperatorDataTypeList(string FileNameURL) SummaryExports a text file for Echoview operator information output as comma separated variables. The data consists of: OperatorName, OperatorType, OperandNumber, OperandDataType. Parameters
ReturnTrue if successful. ExampleDim vEchoviewCom: Set vEchoviewCom = GetObject(, "EchoviewCom.EvApplication") vEchoviewCom.ExportOperatorDataTypeList ("D:\PathTo\YourFileName.txt") |
|
boolean ExportPropertyInformation(string FileNameURL) SummaryExports a text file for Echoview properties as comma separated variables. The data the same as output under Properties Information window, right-click menu Export. Parameters
ReturnTrue if successful. ExampleDim vEchoviewCom: Set vEchoviewCom = CreateObject("EchoviewCom.EvApplication") vEchoviewCom.ExportPropertyInformation("YourFileURL") |
|
boolean ExportOperatorDataTypeList(string FileNameURL) SummaryExports a text file for Echoview operator information output as comma separated variables. The data consists of: OperatorName, OperatorType, OperandNumber, OperandDataType. Parameters
ReturnTrue if successful. ExampleDim vEchoviewCom: Set vEchoviewCom = GetObject(, "EchoviewCom.EvApplication") vEchoviewCom.ExportOperatorDataTypeList ("D:\PathTo\YourFileName.txt") |
|
string GetLastLogMessage() SummaryReturns the last message logged by Echoview. Useful after a method fails. ParametersNone. ReturnThe last message. Note: See also Scripting errors. |
|
boolean IsLicensed() SummaryReturns a boolean to indicate whether Echoview is licensed for automation. ParametersNone. ReturnTrue if Echoview has the required module for COM automation and is licensed, false if not. |
|
(read-only) LiveViewingDataLogger SummaryView the data logger used for live viewing. LiveViewingDataLogger refers to EvDataLogger. ExampleRefer to Data logger snippet. |
|
boolean Log(string Message) SummaryAdds a message to the Echoview log. ParametersThe message to log and the Echoview message bar. ReturnWhether successful. Note: See also Scripting errors. |
|
(read-write) String LogFileName SummaryThe name of the file that the Echoview log is written to. The behavior of the property includes:
ExampleDim EvApp: Set EvApp = CreateObject("EchoviewCom.EvApplication") EvApp.Log(EvApp.LogFileName) MsgBox(EvApp.LogFileName) ' Test change path (absolute) EvApp.LogFileName="C:\temp\evtest.log" MsgBox("Change (absolute): " & EvApp.LogFileName) EvApp.Log("Change (relative): " & EvApp.LogFileName) ' Test change filename EvApp.LogFileName="evtest_001.log" MsgBox("Change (filename): " & EvApp.LogFileName) EvApp.Log("Change (filename): " & EvApp.LogFileName) ' Test reset EvApp.LogFileName="" MsgBox("Reset: " & EvApp.LogFileName) EvApp.Log("Reset: " & EvApp.LogFileName) Refer to Creating a script for another example of this property's usage.
Note: See also Scripting errors. |
|
Minimize() SummaryMinimizes the Echoview window. |
|
EvFile NewFile(String Filename) SummaryCreates a new EV file and returns the EvFile object for it. ParametersFilename (optional) The full path to a template. ReturnAn EvFile object for the newly created document. |
|
EvFile OpenFile(String FileName) SummaryOpens an EV file. Parameters
ReturnAn EvFile object for the newly opened document. |
|
Quit() SummaryCloses the connected instance of Echoview. Note: Quit closes Echoview whether the instance was opened manually or opened using the COM interface. ParametersNone. ReturnNone. |
|
Restore() SummaryRestores the Echoview window to the state it was in prior to Minimize(). ParametersNone. ReturnNone. |
|
boolean StartLiveViewing(EvDataLogger oDataLogger) SummaryStart live viewing with the specified data logger. Parameters
ReturnTrue, if successful. ExampleDim oEvApp: Set oEvApp = CreateObject("EchoviewCom.EvApplication") If oEvApp.DataLoggers.Count = 0 Then MsgBox "No data loggers yet. Retry?" If oEvApp.DataLoggers.Count = 0 Then MsgBox "Still no data loggers. Quitting." WScript.Quit End If End If If oEvApp.DataLoggers.Count > 1 Then Dim iLogger For iLogger = 0 To oEvApp.DataLoggers.Count - 1 MsgBox oEvApp.DataLoggers(iLogger).Description Next End If Dim oLogger: Set oLogger = oEvApp.DataLoggers(oEvApp.DataLoggers.Count - 1) MsgBox "Start live viewing on " & oLogger.Description & "?" If oEvApp.LiveViewingDataLogger Is Nothing Then If Not oEvApp.StartLiveViewing(oLogger) Then MsgBox "Failed to start live viewing with " & oLogger.Description WScript.Quit End If End If MsgBox oEvApp.LiveViewingDataLogger.Description & " is live viewing. Stop?" oEvApp.StopLiveViewing If oEvApp.LiveViewingDataLogger Is Nothing Then MsgBox "Stopped live viewing" Else MsgBox "Failed to stop live viewing" End If |
|
StopLiveViewing() SummaryStop live viewing. ParametersNone. ReturnNone. Live viewing stops. ExampleRefer to Data logger snippet. |
|
(read-only) String Version SummaryGet a string representation of Echoview’s version number. ParametersNone. ReturnA string for Echoview’s version number. |
Example usage
To connect to Echoview, first create an instance of the EvApplication object:
' Open Echoview (if Echoview is already open, connects to the ' open Echoview instance) Dim EvApp Set EvApp = CreateObject("EchoviewCom.EvApplication")
Once done, you can use this object to find information about Echoview or to create, open or access EV files:
' Shows what version of Echoview is running MsgBox EvApp.Version
' Open an EV file Dim MyFile Set MyFile = EvApp.OpenFile("c:\Example.EV")
See also
Scripting with COM objects
Getting started with scripting
COM object hierarchy