Retrieves all user-defined attributes for a member.
Syntax
ESS_FUNC_M EssOtlGetUserAttributes (hOutline, hMember, pusCount, ppAttributeList);
Parameter | Data Type | Description |
---|---|---|
hOutline | ESS_HOUTLINE_T | Outline context handle. |
hMember | ESS_HMEMBER_T | Handle of member for which to get the user-defined attribute. |
pusCount | ESS_PUSHORT_T | Count of user attributes returned; defines the number of elements in the ppAttributeList array. |
ppAttributeList | ESS_PPMBRNAME_T | Array of *pusCount members. Each element of the array contains a single user-defined attribute string. |
Notes
A caller can set any number of user-defined attributes for a member using the EssOtlSetUserAttribute() call. Each attribute is defined as a unique string that follows the same conventions as member names.
A user attribute can be the same as any member name, alias, or generation or level name.
Call EssFree() to free the returned attribute list.
Return Value
Returns 0 if successful.
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_HMEMBER_T hMember; ESS_USHORT_T Count, ind; ESS_PMBRNAME_T AttributeList = ESS_NULL; 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); /************ Get User Attributes ***********/ if (!sts) { sts = EssOtlFindMember(hOutline, "Jan", &hMember); } if (!sts && hMember) { sts = EssOtlGetUserAttributes(hOutline, hMember, &Count, &AttributeList); } if (!sts && AttributeList) { printf("User Attribute:\n"); for(ind = 0; ind < Count; ind++) { printf("%s\n",AttributeList[ind]); } EssFree(hInst, AttributeList); }
See Also