I came across a similar problem when working on implementing an automation framework:
http://community.smartbear.com/forum/post/?mode=singleThread&thread=d117d8f0-c2c5-4e2e-abcd-4bbf6896a94cOne thing that can be used is that all the mapped objects, whether they are on screen or not, include properties that match the name of their children. So you can iterate through the properties, filter out common ones, and crawl through the name mapping with them.
This is a really ugly approach that I came up with. Apologies for the awkwardness. It just posts the info to the log, which you can copy and paste into Excel to delete extraneous columns.
'////////////////////////////////////////////////////////////////////////
'
' Service : ExportAliasesTree().
'
' Abstract : Exports a list of all the aliases defined in the project.
' This only works if the mapped objects are not currently
' displayed, so mapped application(s) are automatically
' closed.
' The alias tree is shown in the log.
'
' Inputs and Type : None.
'
'/////////////////////////////////////////////////////////////////////////
Sub ExportAliasTree()
' BEGIN
Options.Run.Timeout = 1
Call GetNextAlias(Aliases, "Aliases")
Options.Run.Timeout = 10000
End Sub ' ExportAliasTree
'////////////////////////////////////////////////////////////////////////
'
' Service : ExportNameMappingTree().
'
' Abstract : Exports a list of all the mapped objects in the project.
' This only works if the mapped objects are not currently
' displayed, so mapped application(s) are automatically
' closed.
' The name mapping tree is shown in the log.
'
' Inputs and Type : None.
'
'/////////////////////////////////////////////////////////////////////////
Sub ExportNameMappingTree()
' BEGIN
Options.Run.Timeout = 1
Log.AppendFolder("Name Mapping")
Call GetNextAlias(NameMapping.Sys)
Log.PopLogFolder
Options.Run.Timeout = 10000
End Sub ' ExportNameMappingTree
'////////////////////////////////////////////////////////////////////////
'
' Service : GetNextAlias().
'
' Abstract : Exports the name of an alias object or name mapping
' object to the test log, then is recursively called for
' all children of that object.
'
' Inputs and Type : AliasObject: The object to log.
' strAliasObjectName: The mapped name of the object to log
'
'/////////////////////////////////////////////////////////////////////////
Sub GetNextAlias(AliasObject, strAliasObjectName)
' local variables
Dim iteratorProperties ' Group of all properties of the object to log
Dim iteratorProp ' Current property of object to log
' BEGIN
Set iteratorProperties = aqObject.GetProperties(AliasObject)
While iteratorProperties.HasNext
Set IteratorProp = iteratorProperties.Next
If (iteratorProp.ValueType = 29) Then
Select Case iteratorProp.Name
Case "Exists","NamedChild","NamedChildCount","NodeDescription", _
"_NewEnum","ChildCount","Clipboard","CPU","CPUCount", _
"CPUUsage","Desktop","DomainName","FullName","HostName","Id", _
"MappedName","MemUsage","Name","OleObject","OSInfo","Parent",_
"UserName","CommandLine","VMSize","AccessibilityObject",_
"SynchRoot", "placeholder"
Case Else
Call Log.AppendFolder(strAliasObjectName & " " & _
iteratorProp.Name,iteratorProp.Name)
If aqObject.GetPropertyValue( _
aqObject.GetPropertyValue(AliasObject, _
iteratorProp.Name),"Exists") = True Then
aqObject.GetPropertyValue(AliasObject, _
iteratorProp.Name).Terminate
End If ' aqObject.GetPropertyValue
Call GetNextAlias(aqObject.GetPropertyValue(AliasObject, _
iteratorProp.Name),iteratorProp.Name)
Call Log.PopLogFolder
End Select ' iteratorProp.Name
End If ' (iteratorProp.ValueType = 29)
Wend ' iteratorProperties.HasNext
End Sub ' GetNextAlias