Visual Data Lineage - Transformation Object - Assign value to the Type Property

I am writing a macro to create transformations in the Visual Data Lineage. It creates one transformation for each attribute associated to the selected Lineage Component. I am trying to set the type property of the transformation object to Direct Map (value=3).  Unfortunately, the type property stays <unspecified>.

' Add transformation
Set tr = df.Transformations.Add(0,0)
tr.Name = "Transform " + attrObjOut.ColumnName
tr.Type=3

What I am doing wrong?