# EsbOtlOpenOutlineQuery

Description

EsbOtlOpenOutlineQuery() opens an existing outline.

Syntax

    EsbOtlOpenOutlineQuery (hCtx, pObject, phOutline)

    ByVal hCtx      As Long
          pObject   As ESB_OBJDEF_T
          phOutline As Long

Parameters

hCtx | Outline context handle. This must be a valid server login context.
pObject | Pointer to object structure defining the outline object to open. Currently this is ignored. You should call EsbSetActive() for the database you are accessing.
phOutline | Pointer to an ESB_HOUTLINE_T variable. This will be set by the API and should be passed in to subsequent API functions.

Return Value

The return value is zero if the function was successful.

OTLAPI_BAD_OBJTYPE
OTLAPI_ERR_FILEOPEN
OTLAPI_ERR_FILEIO

Notes

- Use this function to access an outline using EsbOtlQueryMembers().
- The call will not download the outline and load the entire file into memory.
- Therefore, many of the outline API calls will not work with hOutline that is passed back from this call.
- The following calls are accessible after this call is made. All other Outline API calls will return an error.
  - EsbOtlCloseOutline
  - EsbOtlGetMemberAlias
  - EsbOtlGetMemberFormula
  - EsbOtlGetMemberInfo
  - EsbOtlGetNextAliasCombination
  - EsbOtlGetOutlineInfo
  - EsbOtlGetUserAttributes
  - EsbOtlGetGenName
  - EsbOtlGetGenNames
  - EsbOtlGetLevelName
  - EsbOtlGetLevelNames

Example

    Declare Function EsbOtlOpenOutlineQuery Lib "ESBOTLW.DLL"
    (ByVal hCtx As Long, pObject As ESB_OBJDEF_T, phOutline As Long) As Long

    Sub ESB_OtlOpenOutlineQuery()
       Dim sts As Long
       Dim hOutline As Long
       Dim Object As ESB_OBJDEF_T
       Dim Access As Integer
       Dim AppName As String
       Dim DbName As String

       AppName = "Sample"
       DbName = "Basic"

       sts = EsbSetActive(hCtx, AppName, DbName, Access)
       If sts = 0 Then
         sts = EsbOtlOpenOutlineQuery(hCtx, Object, hOutline)
       End If
    End Sub

See Also

EsbOtlCloseOutline()
EsbOtlOpenOutline()
EsbOtlQueryMembers()
EsbOtlQueryMembersByName()
EsbSetActive()