EsbOtlDeleteGenName() deletes the name of a specific generation within a dimension. Generation names are explicitly added to the outline with EsbOtlSetGenName().
EsbOtlDeleteGenName (hOutline, pszDimension, usGen) ByVal hOutline As Long ByVal pszDimension As String ByVal usGen As Integer
| hOutline | Outline context handle. |
| pszDimension | Name of the dimension that contains the generation. |
| usGen | Number of generation for which to delete name. Leaf members are level 0. |
Returns 0 if successful; otherwise one of the following:
OTLAPI_NO_GENLEVELNAME
OTLAPI_ERR_NOTADIM
Declare Function EsbOtlDeleteGenName Lib
"ESBOTLW" (ByVal hOutline As Long, ByVal pszDimension
As String, ByVal usGen As Integer) As Long
Sub ESB_OtlDeleteGenName()
Dim sts As Long
Dim Dimension As String
Dim GenNum As Integer
Dim Object As ESB_OBJDEF_T
Dim hOutline As Long
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)
'**********************************
'******* Delete Generation Name ***
'**********************************
Dimension = "Year"
GenNum = 2
GenName = "Qtr1 Qtr2 Qtr3 Qtr4"
If sts = 0 Then
sts = EsbOtlDeleteGenName(hOutline,
Dimension, GenNum)
End If
End Sub