EsbOtlGetLevelName() gets the name for a specific level within a dimension. Level names are explicitly added to the outline with EsbOtlSetLevelName().
EsbOtlGetLevelName (hOutline, pszDimension, usLevel, pszName) ByVal hOutline As Long ByVal pszDimension As String ByVal usLevel As Integer ByVal pszName As String
hOutline | Outline context handle. |
pszDimension | Name of dimension that contains the generation. |
usLevel | Number of level number for which to get a name. Leaf members are level 0. |
pszName | Buffer for return of the level of the specified dimension, allocated by the caller. The buffer must be large enough to hold a valid member name (ESB_MBRNAMELEN). |
The return value is zero if the function was successful. Otherwise, the command returns either of the following:
OTLAPI_NO_GENLEVELNAME
OTLAPI_ERR_NOTADIM
Declare Function EsbOtlGetLevelName Lib "ESBOTLW" (ByVal hOutline As Long, ByVal pszDimension As String, ByVal usLevel As Integer, ByVal pszName As String) As Long Sub ESB_OtlGetLevelName() Dim sts As Long Dim Object As ESB_OBJDEF_T Dim hOutline As Long Dim Dimension As String Dim LevelNum As Integer Dim LevelName As String * ESB_MBRNAMELEN Object.hCtx = hCtx Object.Type = ESB_OBJTYPE_OUTLINE Object.AppName = "Sample" Object.DbName = "Basic" Object.FileName = "Basic" sts = EsbOtlOpenOutline(hCtx, Object, ESB_YES, ESB_YES, hOutline) '***************************************** '********** Get Level Name *************** '***************************************** Dimension = "Year" LevelNum = 2 If Not sts Then sts = EsbOtlGetLevelName(hOutline, Dimension, LevelNum, LevelName) End If End Sub
EsbOtlGetLevelNames()
EsbOtlDeleteLevelName()
EsbOtlSetLevelName()