# EsbOtlAssociateAttributeDimension

Description

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

Syntax

    EsbOtlAssociateAttributeDimension (hOutline, BaseDimension, AttributeDimension)

    ByVal hOutline           As Long
    ByVal BaseDimension      As Long
    ByVal AttributeDimension As Long

Parameters

hOutline | Handle to the outline
BaseDimension | Handle to the standard or base dimension
AttributeDimension | Handle to the base dimension

Return Value

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

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

This function requires no special privileges.

Example

    Sub ESB_OtlAssociateAttributeDimension()
    	' NOTE: 'Out' is a sub to print the output within quotes to a listbox or text box
    	Dim sts as long
    	Dim hOutline as long
    Dim BaseMbr As Long
    Dim AttrMbr As Long

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

     ' abstract function (using EsbOtlFindMember()) to get member handle, while passing in a prompt string
    BaseMbr = ESB_OtlFindMember("Enter base dimension: ")
    If BaseMbr = vbNull Then
    Out "ESB_OtlFindMember() failed."
    Exit Sub
    End If

    ' abstract function (using EsbOtlFindMember()) to get member handle, while passing in a prompt string
    AttrMbr = ESB_OtlFindMember("Enter attribute dimension: ")
    If AttrMbr = vbNull Then Out "ESB_OtlFindMember() failed.": Exit Sub

    sts = EsbOtlAssociateAttributeDimension(ghOutline, BaseMbr, AttrMbr)

    ' abstract sub to call EsbOtlVerifyOutline(), EsbOtlWriteOutline(), EsbOtlRestructure(),EsbUnlockObject() and
    ' EsbOtlCloseOutline() as neededà
    tuckinoutline
    If sts <> 0 Then Out "EsbOtlAssociateAttributeDimension failed: " & sts: Exit Sub
    End Sub

See Also

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