# EsbOtlDisassociateAttributeDimension

Description

EsbOtlDisassociateAttributeDimension() disassociates an attribute dimension from a base dimension.

Syntax

    EsbOtlDisassociateAttributeDimension (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 base dimension
AttributeDimension | Handle to the attribute dimension

Return Value

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

Notes

- When you dissassociate an attribute dimension from a base dimension, you disassociate all members of the attribute dimension from members of the base dimension.
- A disassociated attribute dimension may not remain in the outline when being verified and written to disk. A suggested method for dealing with this situation is to delete the now disassociated dimension from the outline.

Access

This function requires no special privileges.

Example

    	Sub ESB_OtlDisAssociateAttributeDimension()
    		' 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

    BaseMbr = ESB_OtlFindMember("Enter base dimension: ")
    If BaseMbr = vbNull Then MsgBox "ESB_OtlDisAssociateAttributeDimension() failed.": Exit Sub

        		AttrMbr = ESB_OtlFindMember("Enter attribute dimension: ")
        		If AttrMbr = vbNull Then MsgBox "ESB_OtlDisAssociateAttributeDimension() failed.": Exit Sub

        		sts = EsbOtlDisassociateAttributeDimension(ghOutline, BaseMbr, AttrMbr)

        		sts = EsbOtlDeleteDimension(ghOutline, AttrMbr, "")
        		If sts <> 0 Then
            			Out "EsbOtlDeleteDimension failed" & sts: Exit Sub
        		Else
            			Out "EsbOtlDeleteDimension succeeded: " & sts
        		End If

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

See Also

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