Code for adding a tangent constraint from a sketch line to an edge?

I recorded a macro that cuts a keyway  in a round solid BUT the macro does not hold the tangent constraint when the OD of the solid changes

Here is the code I have right now:

Dim SkLine As Object
Set SkLine = Part.SketchManager.CreateLine(-0.02198331910769, -0.1289730744916, 0, 0.02927105152665, -0.1289730744916, 0)
Part.SetPickMode
Part.ClearSelection2 True
boolstatus = Part.Extension.SelectByID2("", "EDGE", -0.007505496873711, -0.114579723834, -0.05079999999998, True, 0, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("Line1", "SKETCHSEGMENT", -0.005750210208151, -0.1307283611571, -0.0254, True, 0, Nothing, 0)
Part.SketchAddConstraints "sgTANGENT"
Part.SketchAddConstraints "sgTANGENT"

any advice?

Thanks,

  Matt

SolidworksApi macros