# EssOtlDeleteLevelName

Description

EssOtlDeleteLevelName() deletes the name for a specific level within a dimension.

Syntax

    ESS_FUNC_M EssOtlDeleteLevelName (hOutline, pszDimension, usLevel);

ESS_HOUTLINE_T | hOutline
ESS_STR_T | pszDimension
ESS_USHORT_T | usLevel

Parameters

hOutline | Outline context handle.
pszDimension | Name of the dimension that contains the level name.
usLevel | Number of level for which to delete name. Leaf members are level 0.

Return Value

Returns 0 if successful; otherwise one of the following:

OTLAPI_NO_GENLEVELNAME
OTLAPI_ERR_NOTADIM

Notes

- In C programs, call EssFree() to free the returned buffer.

Example

    #include <essapi.h>
    #include <essotl.h>

    ESS_STS_T          sts = 0;
    ESS_HOUTLINE_T     hOutline;
    ESS_OBJDEF_T       Object;
    ESS_APPNAME_T      szAppName;
    ESS_DBNAME_T       szDbName;
    ESS_OBJNAME_T      szFileName;
    ESS_STR_T          Dimension;
    ESS_USHORT_T       LevelNum;

    memset(&Object, '\0', sizeof(Object));
    Object.hCtx = hCtx;
    Object.ObjType = ESS_OBJTYPE_OUTLINE;
    strcpy(szAppName, "Sample");
    strcpy(szDbName, "Basic");
    strcpy(szFileName, "Basic");
    Object.AppName  = szAppName;
    Object.DbName   = szDbName;
    Object.FileName = szFileName;

    sts = EssOtlOpenOutline(hCtx, &Object, ESS_TRUE,
          ESS_TRUE, &hOutline);

    /**********  Delete Level Name  *************/
    Dimension = "Year";
    LevelNum = 2;
    if (!sts)
    {
       sts = EssOtlDeleteLevelName(hOutline,
             Dimension, LevelNum);
    }

See Also

EssOtlGetLevelName()
EssOtlSetLevelName()