Cannot override attachment value on Transformation

I want to be able to Import Visual Data Lineage via a macro, and it works OK, except for one thing. It won't apply an override value to an attachment bound to a Transformation. I can do it for attributes, but not Transformations. Is this a bug, or do I need a different command? Here's the outline of what I'm doing
[color=#0000ff]Set[/color] [color=#000000]theAttachmentType[/color] = [color=#000000]theDictionary[/color][color=#000080].AttachmentTypes[/color](attachmentType)
[color=#0000ff]Set[/color] [color=#000000]theAttachment[/color] = [color=#000000]theAttachmentType[/color][color=#000080].Attachments[/color](attachmentName)
[color=#0000ff]Set[/color] [color=#000000]theBoundAttachment[/color] = [color=#000000]currTran[/color][color=#000080].BoundAttachments[/color]([color=#000000]theAttachment[/color][color=#000080].ID[/color])
[color=#000000]theBoundAttachment[/color][color=#000080].ValueOverride[/color] = [color=#000000]importValue[/color]
  • Thanks, Nic. I seem to have missed a line out, the full code is below. Idera have confirmed that this doesn't work, and there's no way around it. We're still waiting to hear about if and when they propose to fix it. Here's a macro you can use to try it yourself. ' tests update of attachments for Transformations - all hard-coded ' seems to demonstrate that we cannot update attachment value overrides for transformations - look for this line: 'theBoundAttachment.ValueOverride = attValueOverride ' DOES NOT WORK !!!!!!!!!!!!!!!!!!! 'Requires the following: ' Data Flow called "Names", With a Transformation called "Customer ID" ' - make sure this has no attachments ' In the Data Dictionary ' Attachment Type "Data Lineage Features", for Transformations ' - Attachments called "Transformation Status" and "Transformation Status Commentary", both allowing text input Dim diag As Diagram Dim tran As Transformation Dim dflow As DataFlow Dim theDictionary As Dictionary Dim theAttachment As Attachment Dim theAttachmentType As AttachmentType Dim theBoundAttachment As BoundAttachment Dim dflowNameStr As String Dim tranNameStr As String Dim attValueOverride As String Dim tranStatus As String Dim tranStatusCommentary As String Option Explicit Sub Main Debug.Clear Set diag = DiagramManager.ActiveDiagram Debug.Print "Testing update of attachments for transformations" Debug.Print "Diagram Name: " & diag.ProjectName Debug.Print "File Name: " & diag.FileName & vbCrLf & "==============================================" dflowNameStr = "Names" tranNameStr = "Customer ID" tranStatus = "Transformation Issue" tranStatusCommentary = "some words about it" Set theDictionary = DiagramManager.ActiveDataDictionary Set dflow = diag.DataFlows.Item(dflowNameStr) If dflow Is Nothing Then 'data flow doesn't exist Debug.Print "Data Flow " & dflowNameStr & " does not exist - aborted" Exit Sub End If Set tran = dflow.Transformations.Item(tranNameStr) If (tran Is Nothing) Then 'the transformation does not exist Debug.Print "Tramsformation " & tranNameStr & " does not exist - aborted" Exit Sub End If Set theAttachmentType = theDictionary.AttachmentTypes("Data Lineage Features") ' Transformation Status Set theAttachment = theAttachmentType.Attachments("Transformation Status") Set theBoundAttachment = tran.BoundAttachments.Add(theAttachment.ID) theBoundAttachment.ValueOverride = tranStatus ' DOES NOT WORK !!!!!!!!!!!!!!!!!!! ' Transformation Status Commentary Set theAttachment = theAttachmentType.Attachments("Transformation Status Commentary") Set theBoundAttachment = tran.BoundAttachments.Add(theAttachment.ID) theBoundAttachment.ValueOverride = tranStatusCommentary ' DOES NOT WORK !!!!!!!!!!!!!!!!!!! Dim boxMessage As String boxMessage = "Test update complete" MsgBox(boxMessage,vbOkOnly,"Transformation attachment test macro") Exit Sub 'Error_handle: ' MsgBox("Please enter a valid path.",,"Error!") ' GoTo start_dialog End Sub
Reply Children
No Data