SymbolQuery Class
The SymbolQuery class represents a symbol query that is built from the menu option: Symbol Query. The functions and properties of this class can be used to build a new symbol query, modify an existing symbol query and output the results to a worksheet.
Property Summary
- Property SymbolOutput As SymbolOutput
Sub/Function Summary
- Sub AddSymbolSpec(symbolSpec As String, [root As String])
- Sub ClearSpecs()
- Sub LoadQuery(fileName As String)
- Sub RunToWorksheet([worksheetName As String], [cell As String])
Properties
Parameter | Description |
---|---|
SymbolOutput |
Property SymbolOutput As SymbolOutput Specifies whether the query results include symbol name, symbol description or both.
|
Subs/Functions
Parameter | Description |
---|---|
AddSymbolSpec |
Sub AddSymbolSpec(symbolSpec As String, [root As String]) Adds a symbol spec representing the hierarchy you wish to query.
|
ClearSpecs |
Sub ClearSpecs() Removes all symbol specs that have been added or loaded in the SymbolQuery. |
LoadQuery |
Sub LoadQuery(fileName As String) Loads a query spec that has been previously built and saved from the menu option: Symbol Query
|
RunToWorksheet |
Sub RunToWorksheet([worksheetName As String], [cell As String]) Runs a symbol query and places the results into the specified worksheet and cell location.
|
Sample Usage:
Sub RunSymbolQuery()
On Error GoTo ErrorHandler
Dim query As Longview.SymbolQuery
Set query = New Longview.SymbolQuery
query.LoadQuery “C:\MySymbolQuery.lvqdq”
query.SymbolOutput = SymbolOutput_Name
query.RunToWorksheet “MySymbolQuery”, “B1”
ErrorHandler:
If Err.Number <> 0 Then
MsgBox “Unable to run Symbol Query (“ & Err.Number & “) – “ & Err.Description
End If
End Sub