# EssOtlAssociateAttributeDimension

Description

EssOtlAssociateAttributeDimension() associates an attribute dimension with a standard or base dimension.

Syntax

ESS_FUNC_M EssOtlAssociateAttributeDimension (hOutline, hStandardDimension, hAttributeDimension);

ESS_HOUTLINE_T | hOutline;
ESS_HMEMBER_T | hStandardDimension;
ESS_HMEMBER_T | hAttributeDimension;

Parameters

hOutline | Handle to the outline
hStandardDimension | Handle to the standard or base dimension
hAttributeDimension | Handle to the attribute dimension

Return Value

Notes

- The attribute dimension must be sparse.
- The standard or base dimension must be sparse.
- You must associate an attribute dimension with a standard or base dimension.
- You can associate more than one attribute dimension with a base dimension.
- You cannot associate an attribute dimension with more than one base dimension.

Access

Example

    void ESS_OtlAssociateAttributeDimension()
    {
       ESS_STS_T        sts = ESS_STS_NOERR;
       ESS_HOUTLINE_T   hOutline;
       ESS_HMEMBER_T    hBaseMbr;
       ESS_HMEMBER_T    hAttrMbr;
       ESS_OBJDEF_T     Object;
       ESS_APPNAME_T    szAppName;
       ESS_DBNAME_T     szDbName;
       ESS_OBJNAME_T    szFileName;
       ESS_PROCSTATE_T  pState;

       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);
       printf("EssOtlOpenOutline() sts: %ld\n",sts);

       sts = EssOtlFindMember(hOutline, "Product", &hBaseMbr);
       printf("EssOtlFindMember() sts: %ld\n",sts);

       sts = EssOtlFindMember(hOutline, "Color", &hAttrMbr);
       printf("EssOtlFindMember() sts: %ld\n",sts);

       sts = EssOtlAssociateAttributeDimension(hOutline,hBaseMbr,hAttrMbr);
       printf("EssOtlAssociateAttributeDimension() sts: %ld\n",sts);

       sts = EssOtlWriteOutline(hOutline, &Object);
       printf("EssOtlWriteOutline() sts: %ld\n",sts);

       sts = EssOtlRestructure(hCtx, ESS_DOR_ALLDATA);
       printf("EssOtlRestructure() sts: %ld\n",sts);

       if (!sts)
       {
          sts = EssGetProcessState (hCtx, &pState);
          while (!sts || (pState.State != ESS_STATE_DONE))
             sts = EssGetProcessState (hCtx, &pState);
       }
       sts = EssOtlCloseOutline(hOutline);
       printf("EssOtlCloseOutline() sts: %ld\n",sts);
    }

See Also

EssCheckAttributes()
EssFreeStructure()
EssGetAssociatedAttributesInfo()
EssGetAttributeInfo()
EssGetAttributeSpecifications()
EssOtlAssociateAttributeMember()
EssOtlDisassociateAttributeDimension()
EssOtlDisassociateAttributeMember()
EssOtlFindAttributeMembers()
EssOtlFreeStructure()
EssOtlGetAssociatedAttributes()
EssOtlGetAttributeInfo()
EssOtlGetAttributeSpecifications()
EssOtlQueryAttributes()
EssOtlSetAttributeSpecifications()