GetViewsByFilePath Method
Gets a collection of views that match the session file path.
expression.GetViewsByFilePath( _
ByVal As String _
) As View() object
where
expression is a variable that represents a
Frame Object
Parameters
- filePath
- The session file path to match
Return Value
An array of View objects.This is a set of
View Objects that match the file path.
This sample gets all of the running views and prints the number of views and the title of each view.
Public Sub GetRunningViewsByFilePath()
'Declare object variables for the Application and Frame Objects
Dim app As Attachmate_Reflection_Objects_Framework.ApplicationObject
Dim f As Attachmate_Reflection_Objects.Frame
'Declare variables for views
Dim myView As Attachmate_Reflection_Objects.view
Dim v As Variant
Dim allViews As Variant
'Get a handle to the Application object
Set app = GetObject("Reflection Workspace")
'Get the Frame object and print the number of views
Set f = app.GetObject("Frame")
Debug.Print "count=" & f.ViewCount
'Get all the view objects in the frame and print the title of each view
For Each v In f.GetViewsByFilePath(Environ$("USERPROFILE") & "\documents\micro focus\reflection\demo.rd3x")
Set myView = v
Debug.Print "View title = " & myView.titleText
Next
End Sub