Gets dimension information.
Syntax
ESS_FUNC_M EssGetDimensionInfo (hCtx, MbrName, pDims, ppDimInfo);
| Parameter | Data Type | Description |
|---|---|---|
hCtx | ESS_HCTX_T | API context handle |
MbrName | ESS_STR_T | Member name of dimension for which to return information. If NULL, returns information about every dimension. If member name is invalid, error results. |
pDims | ESS_PULONG_T | Pointer to the number of information structures returned |
ppDimInfo | ESS_DIMENSIONINFO_T | Pointer to an array of information structures |
Notes
The constant values ESS_TTYPE_ATTRIBUTE and ESS_TTYPE_ATTRCALC for theDimTag field of the ESS_DIMENSIONINFO_T structure indicate that the dimension is an attribute dimension.
TheDimDataType field of the ESS_DIMENSIONINFO_T structure indicates the type of attribute dimension.
Return Value
If successful, returns an array of dimension information structures.
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