EsbOtlGetGenName() retrieves the name for a specific generation within a dimension.
EsbOtlGetGenName (hOutline, pszDimension, usGen, pszName)
ByVal hOutline As Long ByVal pszDimension As String ByVal usGen As Integer ByVal pszName As String
hOutline | Outline context handle. |
pszDimension | Name of dimension that contains the generation name. |
usGen | Number of generation for which to get a name. The dimension is generation 1. |
ppszName | Buffer for return of generation name, allocated by the caller. The buffer must be large enough to hold a valid member name (ESB_MBRNAMELEN). |
Returns 0 if successful; otherwise:
OTLAPI_NO_GENLEVELNAME
OTLAPI_ERR_NOTADIM
Declare Function EsbOtlGetGenName Lib "ESBOTLW" (ByVal hOutline As Long, ByVal pszDimension As String, ByVal usGen As Integer, ByVal pszName As String) As Long Sub ESB_OtlGetGenName() Dim sts As Long Dim Object As ESB_OBJDEF_T Dim hOutline As Long Dim Dimension As String Dim GenNum As Integer Dim GenName 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 Gen Name ****************** '********************************************** Dimension = "Year" GenNum = 2 If Not sts Then sts = EsbOtlGetGenName(hOutline, Dimension, GenNum, GenName) End If End Sub