# EssGetDimensionInfo

Description

EssGetDimensionInfo() gets dimension information.

Syntax

    ESS_FUNC_M EssGetDimensionInfo (hCtx, MbrName, pDims, ppDimInfo);

ESS_HCTX_T | hCtx
ESS_STR_T | MbrName
ESS_PULONG_T | pDims
ESS_PPDIMENSIONINFO_T | ppDimInfo

Parameters

hCtx | Essbase API context handle
MbrName | Member name of dimension for which to return information. If NULL, returns information about every dimension. If member name is invalid, error results.
pDims | Pointer to the number of information structures returned
ppDimInfo | Pointer to an array of information structures

Return Value

If successful, returns an array of dimension information structures.

Notes

- The constant values ESS_TTYPE_ATTRIBUTE and ESS_TTYPE_ATTRCALC for the DimTag field of the ESS_DIMENSIONINFO_T structure indicate that the dimension is an attribute dimension.
- The DimDataType field of the ESS_DIMENSIONINFO_T structure indicates the type of attribute dimension.

Example

    ESS_FUNC_M
    ESS_GetDimensionInfo(ESS_HCTX_T hCtx, ESS_HINST_T hInst)
    {
       ESS_FUNC_M sts = ESS_STS_NOERR;
       ESS_STR_T MbrName;
       ESS_ULONG_T nDims, ind;
       ESS_PDIMENSIONINFO_T DimInfo = NULL;

       MbrName = "Year";
       sts = EssGetDimensionInfo(hCtx, MbrName, &nDims,
             &DimInfo);

       if(!sts && DimInfo)
       {
    printf("-------- Dimension Information --------\r\n\r\n");
          for(ind = 0; ind < nDims; ind++)
          {
    printf("Dimension Name: %s\r\n",
            DimInfo[ind].DimName);
    printf("Dimension Number: %d\r\n",
            DimInfo[ind].DimNumber);

             switch (DimInfo[ind].DimType)
             {
                case ESS_DIMTYPE_DENSE:
    printf("Dimension Type: %s\r\n","DENSE");
                   break;
                default:
    printf("Dimension Type: %s\r\n","SPARSE");
                   break;
             }
    printf("\r\n");
          }
           EssFree(hInst, DimInfo);
       }
       return (sts);
    }

See Also

EssBuildDimension()
EssGetApplicationInfo()
EssGetApplicationInfoEx()
EssGetDatabaseInfo()
EssGetDatabaseInfoEx()