EsbOtlSetLevelName() sets the name for a specific level within a dimension.
EsbOtlSetLevelName (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 level. |
| usGen | Number of level for which to set a name. Leaf members are level 0. |
| pszName | Name to give the level. |
Returns 0 if successful; otherwise one of the following:
OTLAPI_BAD_GENLEVELNAME
OTLAPI_ERR_GENLEVELNAMEEXISTS
OTLAPI_ERR_GENLEVELEXISTS
OTLAPI_ERR_NOTADIM
OTLAPI_ ERR_GENLEVELNAMEMBR
Declare Function EsbOtlSetLevelName Lib
"ESBOTLW" (ByVal hOutline As Long, ByVal pszDimension As String,
ByVal usLevel As Integer, ByVal pszName As String) As Long
Sub ESB_OtlSetLevelName()
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
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)
'************************************
'********** Set Level Name **********
'************************************
Dimension = "Year"
LevelNum = 1
LevelName = "Month"
If Not sts Then
sts = EsbOtlSetLevelName(hOutline,
Dimension, LevelNum, LevelName)
End If
End Sub
EsbOtlDeleteLevelName()
EsbOtlGetLevelName()
EsbOtlGetLevelNames()