# EsbOtlGetAttributeSpecifications

Description

EsbOtlGetAttributeSpecifications() retrieves attribute specifications for the outline.

Syntax

    EsbOtlGetAttributeSpecifications (hOutline, AttrSpecs)

    ByVal hOutline  As Long
          AttrSpecs As ESB_ATTRSPECS_T

Parameters

hOutline | Handle to the outline
AttrSpecs | Attribute specifications

Return Value

Returns STS = 0 when successful. Otherwise, returns an error code.

Notes

- This function is similar to EsbGetAttributeSpecifications(), except that it returns information from the opened outline.
- Set attribute specifications for the outline using EsbOtlSetAttributeSpecifications().
- Attribute specifications are used to do the following:
  - Generate a long name
  - Indicate the format of a datetime attribute
  - Indicate a numeric attribute's bucketing type
  - Provide the name of the attribute calculations dimension and the names for the values used with it

Access

This function requires no special privileges.

Example

    Sub ESB_OtlGetAttributeSpecifications()
    	Dim OutAttrSpecs As ESB_ATTRSPECS_T
    	Dim test As String
    	Dim sts as long

    	hOutline = ESB_OtlOpenOutline
    	If hOutline = vbNull Then Out "ESB_OtlOpenOutline() failed: " & sts: Exit Sub

    	sts = EsbOtlGetAttributeSpecifications(hOutline, OutAttrSpecs)
    	If sts <> 0 Then Out "ESB_OtlGetAttributeSpecifications failed" & sts: Exit Sub

    	Out "ESB_OtlGetAttributeSpecifications passed: " & sts
    	Out "DefaultTrueString : " & OutAttrSpecs.DefaultTrueString
    	Out "DefaultFalseString : " & OutAttrSpecs.DefaultFalseString
    	Out "DefaultAttrCalcDimName : " & OutAttrSpecs.DefaultAttrCalcDimName
    	Out "DefaultSumMbrName : " & OutAttrSpecs.DefaultSumMbrName
    	Out "DefaultCountMbrName : " & OutAttrSpecs.DefaultCountMbrName
    	Out "DefaultAverageMbrName : " & OutAttrSpecs.DefaultAverageMbrName
    	Out "DefaultMinMbrName : " & OutAttrSpecs.DefaultMinMbrName
    	Out "DefaultMaxMbrName : " & OutAttrSpecs.DefaultMaxMbrName

    	test = OutAttrSpecs.GenNameBy
    	Select Case test
    		Case ESB_GENNAMEBY_PREFIX
    			Out "GenNameBy : ESB_GENNAMEBY_PREFIX"
    		Case ESB_GENNAMEBY_SUFFIX
    			Out "GenNameBy : ESB_GENNAMEBY_SUFFIX"
    		Case Else
    			Out "GenNameBy : invalid"
    	End Select

    	test = OutAttrSpecs.UseNameOf
    	Select Case test
    		Case ESB_USENAMEOF_NONE
    			Out "UseNameOf : ESB_USENAMEOF_NONE"
    		Case ESB_USENAMEOF_PARENT
    			Out "UseNameOf : ESB_USENAMEOF_PARENT"
    		Case ESB_USENAMEOF_GRANDPARENTANDPARENT
    			Out "UseNameOf : ESB_USENAMEOF_GRANDPARENTANDPARENT"
    		Case ESB_USENAMEOF_ALLANCESTORS
    			Out "UseNameOf : ESB_USENAMEOF_ALLANCESTORS"
    		Case ESB_USENAMEOF_DIMENSION
    			Out "UseNameOf : ESB_USENAMEOF_DIMENSION"
    		Case Else
    			Out "UseNameOf : invalid"
    	End Select

    	test = OutAttrSpecs.Delimiter
    	Select Case test
    		Case ESB_DELIMITER_UNDERSCORE
    			Out "Delimiter : ESB_DELIMITER_UNDERSCORE"
    		Case ESB_DELIMITER_PIPE
    			Out "Delimiter : ESB_DELIMITER_PIPE"
    		Case ESB_DELIMITER_CARET
    			Out "Delimiter : ESB_DELIMITER_CARET"
    		Case Else
    			Out "Delimiter : invalid"
    	End Select

    	test = OutAttrSpecs.DateFormat
    	Select Case test
    		Case ESB_DATEFORMAT_MMDDYYYY
    			Out "DateFormat : ESB_DATEFORMAT_MMDDYYYY"
    		Case ESB_DATEFORMAT_DDMMYYYY
    			Out "DateFormat : ESB_DATEFORMAT_DDMMYYYY"
    		Case Else
    			Out "Delimiter : invalid"
    	End Select

    	test = OutAttrSpecs.BucketingType
    	Select Case test
    		Case ESB_UPPERBOUNDINCLUSIVE
    			Out "BucketingType : ESB_UPPERBOUNDINCLUSIVE"
    		Case ESB_LOWERBOUNDINCLUSIVE
    			Out "BucketingType : ESB_ESB_LOWERBOUNDINCLUSIVE"
    		Case ESB_UPPERBOUNDNONINCLUSIVE
    			Out "BucketingType : ESB_UPPERBOUNDNONINCLUSIVE"
    		Case ESB_LOWERBOUNDNONINCLUSIVE
    			Out "BucketingType : ESB_LOWERBOUNDNONINCLUSIVE"
    		Case Else
    			Out "BucketingType : invalid"
    	End Select
    End Sub

See Also

EsbCheckAttributes()
EsbGetAssociatedAttributesInfo()
EsbGetAttributeInfo()
EsbGetAttributeSpecifications()
EsbOtlAssociateAttributeDimension()
EsbOtlAssociateAttributeMember()
EsbOtlDisassociateAttributeDimension()
EsbOtlDisassociateAttributeMember()
EsbOtlFindAttributeMembers()
EsbOtlGetAssociatedAttributes()
EsbOtlGetAttributeInfo()
EsbOtlQueryAttributes()
EsbOtlSetAttributeSpecifications()